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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x405287
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x405287
mov edx, dword [eax + 4]
test edx, edx
je 0x4051d2
mov ecx, dword [eax]
xor eax, eax
mov dword [ebx + 0xc964], eax
mov dword [ebx + 0xc970], eax
mov dword [ebx + 0xc974], eax
mov dword [ebx + 0xc968], ecx
add ecx, edx
mov esi, ebx
mov dword [ebx + 0xc96c], ecx
call fcn.004014e0
test eax, eax
js 0x40528a
cmp byte [ebx + 0x318], 0
je 0x404ded
cmp dword [ebx + 0x110], 0
jl 0x404dde
cmp dword [ebx + 0x114], 0
jge 0x404ded
mov eax, ebx
call fcn.00404cf0
mov eax, dword [ebx + 0x118]
jmp 0x404e0a
mov ecx, dword [ebx + 0x110]
xor eax, eax
cmp eax, ecx
je 0x404e01
cmp eax, dword [ebx + 0x114]
jne 0x404e04
inc eax
jmp 0x404df5
mov dword [ebx + 0x118], eax
cmp byte [ebx + 0x318], 0
mov dword [esp + 0x14], eax
push ebx
jne 0x404e37
call fcn.00401670
mov ecx, dword [ebx + 0x308]
mov edx, dword [ebx + 0x30c]
mov dword [ebx + 0x300], ecx
mov dword [ebx + 0x304], edx
jmp 0x404e4e
call fcn.00401ab0
add esp, 4
push ebx
call fcn.00401d90
add esp, 4
push ebx
call fcn.00402060
add esp, 4
push ebx
call fcn.00402390
add esp, 4
push ebx
call fcn.00402d80
movzx eax, byte [ebx + 0x319]
mov ecx, dword [ebx + 0x3c]
mov esi, dword [ebx + 0x308]
mov edi, dword [ebx + 0x30c]
cdq
add esp, 4
add eax, dword [ebx + 0x300]
adc edx, dword [ebx + 0x304]
call fcn.004970e0
sub eax, dword [ebx + 0x300]
sbb edx, dword [ebx + 0x304]
add eax, esi
adc edx, edi
add esi, 1
mov dword [ebx + 0x310], eax
mov eax, dword [ebp + 0x10]
adc edi, 0
mov dword [ebx + 0x314], edx
mov dword [ebx + 0x308], esi
mov dword [ebx + 0x30c], edi
test eax, eax
je 0x404ed1
mov ecx, dword [ebx + 0x310]
mov dword [eax], ecx
mov edx, dword [ebx + 0x314]
mov dword [eax + 4], edx
lea eax, [esp + 0x68]
push eax
push ebx
call fcn.004031c0
add esp, 8
lea ecx, [ebx + 0xd2d8]
lea eax, [esp + 0x38]
call fcn.0040b200
mov ecx, dword [esp + 0xb1c]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x70]
add ecx, dword [esp + 0x24]
xor edx, edx
cmp ecx, eax
setl dl
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], eax
xor edi, edi
mov dword [esp + 0x20], edx
lea edx, [ebx + 0x70]
mov dword [esp + 0x28], edx
jmp 0x404f28
mov edx, dword [esp + 0x28]
test edi, edi
je 0x404f3d
test byte [ebx + 0x30], 2
jne 0x404f3d
mov ecx, 1
mov dword [esp + 0x30], ecx
jmp 0x404f49
mov dword [esp + 0x30], 0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
sar eax, cl
push edi
mov dword [esp + edi*4 + 0xae4], eax
mov esi, dword [esp + 0xb20]
sar esi, cl
xor ecx, ecx
add eax, esi
mov esi, dword [edx]
cmp eax, esi
setl cl
sub eax, esi
lea edx, [esp + 0x6c]
push edx
neg ecx
and ecx, eax
add ecx, esi
mov eax, ebx
mov dword [esp + edi*4 + 0xaf4], ecx
call fcn.00403380
push edi
lea eax, [esp + 0x74]
push eax
push ebx
call fcn.00403730
xor eax, eax
add esp, 0x14
xor esi, esi
mov dword [esp + 0x10], eax
cmp dword [esp + 0xb20], eax
je 0x404fe6
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + edi*4 + 0xaec]
mov eax, dword [esp + 0x1c]
sub edx, ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + edi*4 + 0xae0]
push edx
mov edx, dword [esp + 0x18]
sub ecx, eax
push ecx
mov ecx, dword [ebx + 0x5c]
push edi
mov dword [esp + 0x24], eax
push edx
lea eax, [esp + 0x78]
push eax
push ebx
call ecx
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
add esp, 0x18
mov edx, dword [esp + edi*4 + 0xaec]
mov ecx, dword [esp + edi*4 + 0xae0]
sub edx, eax
add edx, edx
sub ecx, esi
add edx, edx
add eax, eax
add ecx, ecx
add edx, edx
sub edx, eax
mov eax, dword [esp + 0x14]
add ecx, ecx
push edx
add ecx, ecx
lea edx, [esi + esi]
sub ecx, edx
push ecx
push eax
mov eax, edi
mov ecx, ebx
call fcn.0040a3f0
xor eax, eax
add esp, 0xc
test edi, edi
setne al
lea ecx, [eax + eax*2 + 2]
mov dword [esp + 0x18], eax
cmp dword [esp + 0xb24], ecx
jl 0x4050d1
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x20]
mov edx, dword [esp + edi*4 + 0xaec]
add esi, dword [esp + 0x1c]
sub edx, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + edi*4 + 0xae0]
push edx
sub eax, esi
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [eax + eax*2 + 0x12]
shl ecx, 4
add ecx, ebx
push ecx
lea eax, [ebx + 0xd2d8]
push eax
push ebx
mov ecx, edi
call fcn.00403e70
mov eax, dword [esp + 0x2c]
lea edx, [eax + eax*2 + 3]
add esp, 0x14
cmp dword [esp + 0xb24], edx
jl 0x4050e7
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x20]
add esi, dword [esp + 0x1c]
mov ecx, dword [esp + edi*4 + 0xaec]
mov edx, dword [esp + edi*4 + 0xae0]
sub ecx, eax
push ecx
sub edx, esi
push edx
mov dword [esp + 0x18], eax
lea eax, [ebx + 0xd2d8]
push edi
mov dword [esp + 0x24], esi
push eax
mov esi, ebx
call fcn.00404850
mov esi, dword [esp + 0x28]
add esp, 0x10
jmp 0x4050e7
cmp dword [esp + 0xb20], 0
je 0x4050e7
mov eax, dword [esp + 0x20]
add esi, dword [esp + 0x1c]
add dword [esp + 0x10], eax
mov eax, dword [esp + edi*4 + 0xae0]
mov ecx, dword [esp + 0x30]
sub eax, esi
mov esi, dword [esp + 0x34]
shl eax, cl
xor edx, edx
cmp eax, esi
setl dl
sub eax, esi
neg edx
and edx, eax
mov eax, dword [esp + edi*4 + 0xaec]
sub eax, dword [esp + 0x10]
add esi, edx
shl eax, cl
xor ecx, ecx
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x2c]
cmp eax, esi
setl cl
add dword [esp + 0x28], 0x20
sub eax, esi
inc edi
neg ecx
and ecx, eax
add esi, ecx
mov dword [esp + 0x2c], esi
cmp edi, 3
jl 0x404f24
cmp dword [ebx + 0xd30c], 0
je 0x405172
mov edx, dword [ebx + 0x60]
call edx
mov eax, dword [ebx + 0x70]
mov ecx, eax
sub ecx, dword [esp + 0x34]
sub eax, esi
push ecx
mov ecx, dword [ebx + 0xd30c]
push eax
mov eax, dword [ebx + 0xd308]
lea edx, [esp + 0x40]
push edx
push eax
call ecx
add esp, 0x10
mov ecx, dword [esp + 0xb1c]
add dword [esp + 0x24], ecx
cmp dword [esp + 0x20], 0
mov dword [esp + 0x1c], 1
jne 0x404eff
xor esi, esi
mov edx, dword [esp + 0x14]
push edx
mov eax, esi
mov ecx, ebx
call fcn.0040a490
inc esi
add esp, 4
cmp esi, 3
jl 0x405192
cmp byte [ebx + 0x318], 0
mov eax, dword [ebx + 0x118]
mov dword [ebx + 0x114], eax
jne 0x4051c4
mov dword [ebx + 0x110], eax
mov ecx, dword [ebx + 0x60]
call ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x110], 0
jl 0x4051e4
cmp dword [ebx + 0x114], 0
jge 0x40520d
mov eax, ebx
call fcn.00404cf0
mov eax, dword [ebx + 0x114]
lea esi, [eax + eax*2 + 0x12]
shl esi, 4
add esi, ebx
lea edi, [ebx + 0xd2d8]
mov ecx, 0xc
mov dword [ebx + 0x118], eax
rep movsd dword es:[edi], dword [esi]
movzx eax, byte [ebx + 0x319]
mov ecx, dword [ebx + 0x3c]
mov esi, dword [ebx + 0x308]
mov edi, dword [ebx + 0x30c]
cdq
add eax, dword [ebx + 0x300]
adc edx, dword [ebx + 0x304]
call fcn.004970e0
sub eax, dword [ebx + 0x300]
sbb edx, dword [ebx + 0x304]
add eax, esi
adc edx, edi
add esi, 1
mov dword [ebx + 0x310], eax
mov eax, dword [ebp + 0x10]
adc edi, 0
mov dword [ebx + 0x314], edx
mov dword [ebx + 0x308], esi
mov dword [ebx + 0x30c], edi
test eax, eax
je 0x40527b
mov edx, dword [ebx + 0x310]
mov dword [eax], edx
mov ecx, dword [ebx + 0x314]
mov dword [eax + 4], ecx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret