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

Disassembly:
sub esp, 0x84
mov eax, dword [0x494284]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
mov ebx, dword [esp + 0x8c]
lea eax, [esp + 4]
push ebp
push esi
push edi
xorps xmm0, xmm0
xor ebp, ebp
push eax
movlpd qword [esp + 0x14], xmm0
mov dword [ebx + 0x1c], ebp
call fcn.00446d79
lea eax, [esp + 0x14]
push eax
call fcn.00446864
push 9
pop ecx
push 9
mov esi, eax
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x40]
lea esi, [esp + 0x30]
pop ecx
push 9
lea edi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
pop ecx
push dword [esp + 0x40]
lea esi, [esp + 0x30]
push eax
push dword [esp + 0x40]
lea eax, [esp + 0x80]
push dword [ebx + 4]
lea edi, [esp + 0x60]
push dword [ebx + 8]
rep movsd dword es:[edi], dword [esi]
push ebp
push eax
call fcn.00406d8d
mov esi, eax
add esp, 0x24
mov eax, dword [ebx]
mov edi, edx
movzx ecx, al
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
cmp ecx, 0x7f
jne 0x404d35
lea edx, [ebx + 0x48]
lea ebp, [ebx + 0x40]
mov dword [esp + 0x18], edx
cmp edi, dword [esp + 0x14]
jl 0x404d18
jg 0x404d0a
cmp esi, dword [esp + 0x10]
jbe 0x404d18
mov eax, esi
mov ecx, edi
sub eax, 0x15180
sbb ecx, 0
jmp 0x404d25
mov eax, esi
mov ecx, edi
add esi, 0x15180
adc edi, 0
mov dword [edx], esi
mov dword [edx + 4], edi
mov dword [ebp], eax
mov dword [ebp + 4], ecx
jmp 0x404e79
test eax, 0x1000000
je 0x404e0c
push dword [esp + 0x38]
mov edi, dword [esp + 0x38]
movzx esi, byte [ebx + 2]
push edi
call fcn.00405000
pop ecx
pop ecx
mov ecx, eax
test esi, esi
jne 0x404d5d
inc esi
jmp 0x404d6a
cmp esi, ecx
jbe 0x404d6a
xor edx, edx
div esi
mov esi, ecx
sub esi, edx
inc esi
push dword [esp + 0x38]
lea eax, [esp + 0x70]
push edi
push esi
push dword [ebx + 4]
push dword [ebx + 8]
push ebp
push eax
call fcn.00406d8d
mov edi, edx
lea ecx, [ebx + 0x48]
add esp, 0x1c
mov dword [esp + 0x18], ecx
lea ebp, [ebx + 0x40]
mov esi, eax
cmp edi, dword [esp + 0x14]
jl 0x404dd9
jg 0x404da0
cmp esi, dword [esp + 0x10]
jbe 0x404dd9
push dword [esp + 0x38]
mov dword [ecx], esi
mov dword [ecx + 4], edi
mov ecx, dword [esp + 0x38]
test ecx, ecx
push 0xb
pop edx
lea eax, [ecx - 1]
cmove eax, edx
push eax
call fcn.00405000
imul eax, eax, 0x15180
lea edx, [ebx + 0x48]
pop ecx
pop ecx
sub esi, eax
mov dword [ebp], esi
sbb edi, 0
mov dword [ebp + 4], edi
jmp 0x404e79
push dword [esp + 0x38]
mov eax, dword [esp + 0x38]
inc eax
mov dword [ebp], esi
push 0xc
pop ecx
cdq
idiv ecx
mov dword [ebp + 4], edi
push edx
call fcn.00405000
pop ecx
pop ecx
imul ecx, eax, 0x15180
lea edx, [ebx + 0x48]
xor eax, eax
add ecx, esi
mov dword [edx], ecx
adc eax, edi
mov dword [edx + 4], eax
jmp 0x404e79
push ecx
call fcn.00411ace
mov edx, eax
sub edx, dword [esp + 0x88]
cmp eax, dword [esp + 0x88]
pop ecx
lea ecx, [edx + 7]
cmovg ecx, edx
lea edx, [ebx + 0x48]
imul eax, ecx, 0x15180
mov dword [esp + 0x18], edx
add esi, eax
adc edi, ebp
lea ebp, [ebx + 0x40]
cmp edi, dword [esp + 0x14]
jl 0x404e61
jg 0x404e4b
cmp esi, dword [esp + 0x10]
jbe 0x404e61
mov dword [edx], esi
sub esi, 0x93a80
mov dword [edx + 4], edi
sbb edi, 0
mov dword [ebp], esi
mov dword [ebp + 4], edi
jmp 0x404e79
mov dword [ebp], esi
add esi, 0x93a80
mov dword [ebp + 4], edi
adc edi, 0
mov dword [edx], esi
mov dword [edx + 4], edi
mov dword [esp + 0x18], edx
mov eax, dword [edx]
xor esi, esi
mov ecx, dword [edx + 4]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp]
mov dword [ebx + 0x20], eax
movzx eax, byte [ebx + 1]
mov dword [ebx + 0x2c], ecx
mov ecx, dword [ebp + 4]
push eax
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x1c], esi
call fcn.00411ace
mov edx, eax
pop ecx
test edx, edx
jns 0x404ec3
call fcn.00412554
mov dword [ebx], eax
and eax, 0xff00
push eax
call fcn.00411ace
mov edx, eax
pop ecx
test edx, edx
js 0x404f95
mov ecx, edx
sub ecx, dword [esp + 0x60]
cmp edx, dword [esp + 0x60]
lea eax, [ecx + 7]
cmovge eax, ecx
mov ecx, dword [esp + 0x1c]
imul eax, eax, 0x15180
add ecx, eax
mov eax, dword [esp + 0x20]
adc eax, esi
cmp eax, dword [esp + 0x14]
jl 0x404f01
jg 0x404ef3
cmp ecx, dword [esp + 0x10]
jbe 0x404f01
mov edx, ecx
mov edi, eax
sub edx, 0x93a80
sbb edi, esi
jmp 0x404f0d
mov edx, ecx
mov edi, eax
add ecx, 0x93a80
adc eax, esi
mov dword [ebx + 0x38], ecx
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x34], edi
lea edi, [ebx + 0x50]
push edi
call fcn.00404b05
pop ecx
test eax, eax
je 0x404f95
mov edx, dword [edi + 4]
mov eax, dword [edi]
cmp edx, dword [ebp + 4]
jg 0x404f3d
jl 0x404f38
cmp eax, dword [ebp]
jae 0x404f3d
xor ecx, ecx
inc ecx
jmp 0x404f3f
mov ecx, esi
cmp edx, dword [ebx + 0x34]
jg 0x404f50
jl 0x404f4b
cmp eax, dword [ebx + 0x30]
jae 0x404f50
xor eax, eax
inc eax
jmp 0x404f52
mov eax, esi
test ecx, ecx
jne 0x404f95
test eax, eax
jne 0x404f76
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x3c]
cmp eax, dword [ecx + 4]
jg 0x404f72
jl 0x404f6f
mov eax, dword [ebx + 0x38]
cmp eax, dword [ecx]
jae 0x404f72
xor esi, esi
inc esi
test esi, esi
je 0x404f95
mov ecx, dword [ebx + 0x30]
mov edx, dword [ebx + 0x34]
mov dword [ebx + 0x20], ecx
mov ecx, dword [ebx + 0x38]
mov dword [ebx + 0x24], edx
mov edx, dword [ebx + 0x3c]
mov dword [ebx + 0x1c], 1
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], edx
mov ecx, dword [esp + 0x90]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
inc eax
call fcn.0043f9b7
add esp, 0x84
ret