Function at 0x409391
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x24
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x3c], 2
je 0x409900
mov eax, dword [0x4bc300]
mov dword [esp + 0x18], eax
mov edx, dword [0x4bc2f8]
sub eax, dword [0x4bc2fc]
add eax, eax
add eax, eax
add eax, eax
sub eax, edx
add eax, 0x20
mov dword [0x4bc2f0], eax
mov eax, dword [ebx]
mov esi, dword [ebx + 4]
cmp eax, esi
cmovl eax, esi
xor ecx, ecx
test eax, eax
cmovs eax, ecx
mov edi, dword [ebx + 8]
cmp eax, edi
cmovl eax, edi
mov ebp, dword [ebx + 0xc]
cmp eax, ebp
cmovl eax, ebp
mov esi, dword [ebx + 0x10]
cmp eax, esi
cmovl eax, esi
mov ecx, dword [ebx + 0x14]
cmp eax, ecx
cmovl eax, ecx
mov edi, dword [ebx + 0x18]
cmp eax, edi
cmovl eax, edi
mov ebp, dword [ebx + 0x1c]
cmp eax, ebp
cmovl eax, ebp
mov esi, dword [ebx + 0x20]
cmp eax, esi
cmovl eax, esi
mov ecx, dword [ebx + 0x24]
cmp eax, ecx
cmovl eax, ecx
mov edi, dword [ebx + 0x28]
cmp eax, edi
cmovl eax, edi
mov esi, dword [ebx + 0x30]
mov ebp, dword [ebx + 0x2c]
cmp esi, ebp
cmovl esi, ebp
xor ecx, ecx
test esi, esi
cmovs esi, ecx
mov edi, dword [ebx + 0x34]
cmp esi, edi
cmovl esi, edi
mov ebp, dword [ebx + 0x38]
cmp esi, ebp
cmovl esi, ebp
mov ecx, dword [ebx + 0x3c]
cmp esi, ecx
cmovl esi, ecx
mov edi, dword [ebx + 0x40]
cmp esi, edi
cmovl esi, edi
mov ebp, dword [ebx + 0x44]
cmp esi, ebp
cmovl esi, ebp
mov ecx, dword [ebx + 0x48]
cmp esi, ecx
cmovl esi, ecx
mov edi, dword [ebx + 0x4c]
cmp esi, edi
cmovl esi, edi
mov ebp, dword [ebx + 0x50]
cmp esi, ebp
cmovl esi, ebp
test eax, eax
je 0x409495
cmp eax, 1
je 0x409495
cmp eax, 3
jle 0x409910
cmp eax, 7
setg al
movzx eax, al
add eax, 3
test esi, esi
je 0x4094ab
cmp esi, 1
je 0x4094ab
xor ecx, ecx
cmp esi, 3
setg cl
mov esi, ecx
add esi, 2
movzx edi, byte [esi + eax*4 + 0x4a3bc0]
movzx ebp, byte [edi + edi + 0x4a3ba0]
mov dword [esp + 4], ebp
movzx eax, byte [edi + edi + 0x4a3ba1]
mov dword [esp + 0x10], eax
mov eax, dword [0x4bc2f4]
lea ecx, [ebx + 0x2c]
mov dword [esp + 0x14], ecx
mov dword [esp], ebx
mov esi, dword [esp + 0x18]
mov dword [esp + 0xc], esi
xor esi, esi
mov ebp, 0x18
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
mov ebx, dword [esp]
mov edi, dword [ebx]
mov dword [esp + 8], edi
cmp dword [esp + 4], edx
jle 0x409687
cmp edx, 0x17
jg 0x409687
mov edi, 0x17
sub edi, edx
shr edi, 3
and edi, 7
mov ecx, ebp
sub ecx, edx
mov esi, eax
sar esi, cl
mov ebx, esi
mov esi, dword [esp + 0xc]
mov byte [esi], bl
lea ebx, [edx + 8]
add esi, 1
cmp ebx, 0x17
jg 0x409666
test edi, edi
je 0x4095db
cmp edi, 1
je 0x4095c0
cmp edi, 2
je 0x4095ae
cmp edi, 3
nop
je 0x40959c
cmp edi, 4
je 0x40958a
cmp edi, 5
je 0x409578
cmp edi, 6
nop
jne 0x4098c5
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
cmp ebx, 0x17
jg 0x409666
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
lea edi, [ebx + 8]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 1], cl
lea edi, [ebx + 0x10]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 2], cl
lea edi, [ebx + 0x18]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 3], cl
lea edi, [ebx + 0x20]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 4], cl
lea edi, [ebx + 0x28]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 5], cl
lea edi, [ebx + 0x30]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 6], cl
lea edi, [ebx + 0x38]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 7], cl
add ebx, 0x40
add esi, 8
cmp ebx, 0x17
jle 0x4095db
mov esi, 0x17
sub esi, edx
shr esi, 3
lea ebx, [esi + 1]
add dword [esp + 0xc], ebx
add edx, 8
add esi, esi
add esi, esi
add esi, esi
add edx, esi
mov esi, 1
mov edi, dword [esp + 4]
mov ecx, edi
shl eax, cl
mov ebx, dword [esp + 8]
or eax, ebx
sub edx, edi
add dword [esp], 4
mov edi, dword [esp]
cmp dword [esp + 0x14], edi
jne 0x4094f1
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov dword [0x4bc2f4], eax
mov dword [0x4bc2f8], edx
mov ecx, esi
test cl, cl
je 0x4098f3
mov esi, dword [esp + 0xc]
mov dword [0x4bc300], esi
mov ecx, dword [esp + 0x14]
mov dword [esp], ecx
add ebp, 0x54
mov dword [esp + 8], ebp
xor ebx, ebx
mov ebp, 0x18
mov dword [esp + 0x14], edi
mov edi, dword [esp]
mov esi, dword [edi]
mov dword [esp + 4], esi
cmp dword [esp + 0x10], edx
jle 0x40987c
cmp edx, 0x17
jg 0x40987c
mov edi, 0x17
sub edi, edx
shr edi, 3
and edi, 7
mov ecx, ebp
sub ecx, edx
mov ebx, eax
sar ebx, cl
mov esi, dword [esp + 0xc]
mov byte [esi], bl
lea ebx, [edx + 8]
add esi, 1
cmp ebx, 0x17
jg 0x40985b
test edi, edi
je 0x4097d0
cmp edi, 1
je 0x4097b5
cmp edi, 2
nop
je 0x4097a3
cmp edi, 3
je 0x409791
cmp edi, 4
je 0x40977f
cmp edi, 5
nop
je 0x40976d
cmp edi, 6
jne 0x4098dc
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
cmp ebx, 0x17
jg 0x40985b
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
lea edi, [ebx + 8]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 1], cl
lea edi, [ebx + 0x10]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 2], cl
lea edi, [ebx + 0x18]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 3], cl
lea edi, [ebx + 0x20]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 4], cl
lea edi, [ebx + 0x28]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 5], cl
lea edi, [ebx + 0x30]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 6], cl
lea edi, [ebx + 0x38]
mov ecx, ebp
sub ecx, edi
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi + 7], cl
add ebx, 0x40
add esi, 8
cmp ebx, 0x17
jle 0x4097d0
mov esi, 0x17
sub esi, edx
shr esi, 3
lea ebx, [esi + 1]
add dword [esp + 0xc], ebx
add edx, 8
add esi, esi
add esi, esi
add esi, esi
add edx, esi
mov ebx, 1
mov edi, dword [esp + 0x10]
mov ecx, edi
shl eax, cl
mov esi, dword [esp + 4]
or eax, esi
sub edx, edi
add dword [esp], 4
mov ecx, dword [esp]
mov edi, dword [esp + 8]
cmp ecx, edi
jne 0x4096e8
mov ebp, dword [esp + 0x14]
mov dword [0x4bc2f4], eax
mov dword [0x4bc2f8], edx
test bl, bl
je 0x4098bb
mov eax, dword [esp + 0xc]
mov dword [0x4bc300], eax
mov eax, ebp
add esp, 0x24
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
jmp 0x409566
mov ecx, ebp
sub ecx, ebx
mov edi, eax
sar edi, cl
mov ecx, edi
mov byte [esi], cl
add ebx, 8
add esi, 1
jmp 0x40975b
mov ebx, dword [esp + 0x18]
mov dword [esp + 0xc], ebx
jmp 0x4096cf
mov dword [esp + 0x38], ebx
add esp, 0x24
pop ebx
pop esi
pop edi
pop ebp
jmp sym._L3_pack_sf_short_MPEG1
mov eax, 2
jmp 0x409495