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

Disassembly:
sub esp, 0x2b4
push ebx
push ebp
push esi
xor ebx, ebx
push edi
xor ebp, ebp
test ebx, ebx
je 0x40945b
push ebx
call fcn.0040a21d
add esp, 4
test ebp, ebp
je 0x409468
push ebp
call fcn.0040a368
add esp, 4
mov eax, dword [esp + 0x2c8]
push 0x41787c
push eax
call fcn.004084f0
mov ebx, eax
push ebx
push 1
lea ecx, [esp + 0x30]
push 0x14
push ecx
call fcn.0040b3c5
add esp, 0x18
cmp eax, 1
jne 0x40944e
mov ecx, 2
mov edi, 0x41970c
lea esi, [esp + 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
mov dword [esp + 0x10], 0
jne 0x4094d3
mov ecx, dword [esp + 0x2c8]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.00409da0
push 0x41d1d4
call fcn.00409e00
add esp, 0xc
jmp 0x4095d8
mov ecx, 2
mov edi, 0x419700
lea esi, [esp + 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x40950b
mov ecx, dword [esp + 0x2c8]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.00409da0
push 0x41d1d4
call fcn.00409e00
add esp, 0xc
jmp 0x4095d0
mov ecx, 2
mov edi, 0x4196f4
lea esi, [esp + 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x40956c
mov ecx, dword [esp + 0x2c8]
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.00409da0
push ebx
push 1
lea edx, [esp + 0x24]
push 2
push edx
call fcn.0040b3c5
mov eax, dword [esp + 0x2c]
push ebx
push 1
and eax, 0xffff
push eax
lea ecx, [esp + 0xd8]
push ecx
call fcn.0040b3c5
lea edx, [esp + 0xdc]
push edx
call fcn.00409e00
add esp, 0x2c
jmp 0x4095d8
mov ecx, 2
mov edi, 0x4196e8
lea esi, [esp + 0x20]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x409944
mov edx, dword [esp + 0x2c8]
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.00409da0
push ebx
push 1
lea eax, [esp + 0x28]
push 2
push eax
call fcn.0040b3c5
mov ecx, dword [esp + 0x30]
push ebx
push 1
and ecx, 0xffff
push ecx
lea edx, [esp + 0x1e0]
push edx
call fcn.0040b3c5
lea eax, [esp + 0x1e4]
push eax
call fcn.00409e00
add esp, 0x2c
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00409960
mov edx, dword [esp + 0x34]
push ebx
push 1
mov ebp, eax
push edx
push ebp
call fcn.0040b3c5
add esp, 0x14
cmp eax, 1
jne 0x40944e
push ebx
call fcn.0040a21d
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x409656
mov eax, dword [esp + 0x30]
push eax
push ebp
call fcn.00409d40
mov eax, dword [esp + 0x38]
mov cl, byte [eax + ebp - 2]
add esp, 8
cmp cl, 0x54
jne 0x409631
cmp byte [eax + ebp - 1], 0x53
je 0x409656
push ebp
call fcn.0040a368
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push 0
push ecx
push edx
call fcn.00409420
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2b4
ret
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, ecx
imul eax, edx
push 0
push edx
lea eax, [eax + eax*2]
push ecx
mov dword [esp + 0x20], eax
call fcn.00409420
mov esi, eax
mov eax, dword [esp + 0x34]
mov ecx, 3
sub ecx, eax
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x58], ecx
mov ecx, 2
sub ecx, eax
lea edx, [ecx + ecx*2]
mov dword [esp + 0x5c], edx
lea ecx, [eax + eax*2]
mov edx, 3
sub edx, ecx
lea ecx, [eax*4]
sub ecx, eax
mov dword [esp + 0x60], edx
neg ecx
mov dword [esp + 0x64], ecx
or ecx, 0xffffffff
sub ecx, eax
lea edx, [ecx + ecx*2]
mov dword [esp + 0x68], edx
mov edx, 0xfffffffe
sub edx, eax
lea edx, [edx + edx*2]
mov dword [esp + 0x6c], edx
mov edx, 0xfffffffd
sub edx, eax
lea edx, [edx + edx*2]
mov dword [esp + 0x70], edx
lea edx, [eax + eax*2]
shl edx, 1
mov edi, 9
sub edi, edx
mov dword [esp + 0x74], edi
mov edi, 6
sub edi, edx
mov dword [esp + 0x78], edi
mov edi, 3
sub edi, edx
mov dword [esp + 0x7c], edi
lea edi, [eax*4]
sub edi, eax
neg edi
shl edi, 1
mov dword [esp + 0x80], edi
mov ebx, dword [esi + 0x28]
mov edi, 0xfffffffd
sub edi, edx
mov dword [esp + 0x84], edi
lea edi, [ecx + ecx*2]
shl edi, 1
mov dword [esp + 0x88], edi
mov edi, 0xfffffff7
sub edi, edx
mov dword [esp + 0x8c], edi
lea edx, [eax + eax*8]
mov edi, 9
sub edi, edx
mov dword [esp + 0x90], edi
mov edi, 6
add esp, 0xc
sub edi, edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x34], 0xfffffffd
mov dword [esp + 0x38], 0xfffffffa
mov dword [esp + 0x3c], 0xfffffff7
mov dword [esp + 0x40], 0xfffffff4
mov dword [esp + 0x44], 0xfffffff1
mov dword [esp + 0x48], 0xffffffee
mov dword [esp + 0x88], edi
mov edi, 3
sub edi, edx
mov dword [esp + 0x8c], edi
mov edi, eax
neg edi
shl edi, 3
sub edi, eax
mov dword [esp + 0x90], edi
mov edi, 0xfffffffd
sub edi, edx
lea ecx, [ecx + ecx*8]
mov dword [esp + 0x94], edi
mov dword [esp + 0x9c], ecx
lea ecx, [eax + eax*2]
shl ecx, 2
mov edi, 0xfffffffa
sub edi, edx
mov edx, 6
sub edx, ecx
mov dword [esp + 0xa0], edx
mov edx, 3
sub edx, ecx
mov dword [esp + 0xa4], edx
lea edx, [eax*4]
sub edx, eax
neg edx
shl edx, 2
mov eax, 0xfffffffd
sub eax, ecx
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], eax
mov al, byte [ebp]
mov edx, 0xfffffffa
sub edx, ecx
mov byte [ebx], al
mov cl, byte [ebp + 1]
mov eax, dword [esp + 0x14]
mov dword [esp + 0xb0], edx
mov byte [ebx + 1], cl
mov dl, byte [ebp + 2]
mov byte [ebx + 2], dl
mov edx, 3
cmp eax, edx
mov dword [esp + 0x98], edi
mov edi, edx
mov dword [esp + 0x1c], edi
jle 0x4098f6
xor eax, eax
mov al, byte [edx + ebp]
inc edx
test al, 0x80
je 0x40989f
mov ecx, eax
sar ecx, 2
and eax, 3
and ecx, 0x1f
cmp eax, 3
je 0x409874
lea eax, [eax + eax*2 + 3]
jmp 0x409883
xor eax, eax
mov ax, word [edx + ebp]
add eax, 4
lea eax, [eax + eax*2]
add edx, 2
test eax, eax
jle 0x4098ec
mov esi, dword [esp + ecx*4 + 0x34]
add esi, edi
add esi, ebx
mov cl, byte [esi]
mov byte [edi + ebx], cl
inc edi
inc esi
dec eax
jne 0x40988f
mov dword [esp + 0x1c], edi
jmp 0x4098e8
cmp eax, 0x7f
je 0x4098ae
lea eax, [eax + eax*2 + 3]
mov dword [esp + 0x18], eax
jmp 0x4098c3
xor eax, eax
mov ax, word [edx + ebp]
add eax, 0x80
lea eax, [eax + eax*2]
mov dword [esp + 0x18], eax
add edx, 2
mov ecx, eax
shr ecx, 2
add edi, ebx
lea esi, [edx + ebp]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
add esi, eax
mov dword [esp + 0x1c], esi
add edx, eax
mov edi, esi
mov esi, dword [esp + 0x10]
cmp edi, dword [esp + 0x14]
jl 0x409854
push ebp
call fcn.0040a368
mov eax, dword [esi]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 8]
add esp, 4
cmp ecx, eax
je 0x409937
mov edi, dword [esi + 4]
dec edi
js 0x409937
mov eax, dword [esi]
mov ecx, dword [esi + 0x28]
lea edx, [eax + eax*2]
imul eax, edi
push edx
lea edx, [ecx + eax*2]
add eax, edx
push eax
mov eax, dword [esi + 8]
imul eax, edi
add eax, ecx
push eax
call int.0040a950
add esp, 0xc
dec edi
jns 0x409911
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x2b4
ret
test ebx, ebx
je 0x409951
push ebx
call fcn.0040a21d
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2b4
ret