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

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
push esi
mov esi, dword [ebx + 8]
mov ecx, dword [esi + 0x118]
xor eax, eax
cmp dword [esi + 0x7c], eax
push edi
setne al
mov dword [esp + 0x14], ecx
cmp ecx, eax
jg 0x499488
mov dword [esp + 0x14], eax
mov ebp, dword [esp + 0x4c]
cmp dword [ebp + 0x20], 0
jne 0x499679
mov eax, dword [esi + 0xec]
sub eax, 0
je 0x4994c3
sub eax, 1
jne 0x499679
mov edx, dword [ebp + 0x14]
mov ecx, esi
call fcn.00497730
test eax, eax
jl 0x499679
mov esi, dword [esi + 0x4c]
mov edi, eax
jmp 0x4994ef
mov edi, dword [ebx + 0x40]
mov eax, dword [ebx + 0x44]
mov ecx, edi
imul ecx, ecx, 0x3e8
cmp ecx, eax
jle 0x4994d9
mov esi, eax
jmp 0x4994ef
mov edi, dword [esi + 0x2c]
mov esi, dword [esi + 0x30]
mov edx, edi
imul edx, edx, 0x3e8
cmp edx, esi
jle 0x499679
test esi, esi
je 0x499679
test edi, edi
je 0x499679
mov eax, dword [ebx + 0x40]
imul esi
mov ecx, eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x30], edx
imul edi
push 0
mov edi, eax
mov eax, dword [esp + 0x34]
push 2
push eax
push ecx
mov dword [esp + 0x3c], ecx
mov esi, edx
call fcn.004ebce0
test esi, esi
mov ecx, eax
mov dword [esp + 0x1c], ecx
mov eax, edx
jg 0x49956a
jl 0x49953c
cmp edi, 0x7fffffff
ja 0x49956a
mov edx, dword [esp + 0x30]
test edx, edx
jg 0x49956a
jl 0x499550
cmp dword [esp + 0x2c], 0x7fffffff
ja 0x49956a
push edx
mov edx, dword [esp + 0x30]
add ecx, edi
push edx
adc eax, esi
push eax
push ecx
call fcn.004ebce0
mov dword [esp + 0x40], edx
jmp 0x499676
mov ebx, edi
xor edi, edi
mov ecx, esi
sar ecx, 0x1f
xor edx, edx
add edx, ebx
mov ebx, esi
adc ebx, edi
cmp ebx, esi
mov ebp, esi
mov dword [esp + 0x38], ecx
ja 0x49959c
jb 0x49958d
xor esi, esi
cmp edx, esi
jae 0x49959c
mov edi, 1
mov dword [esp + 0x28], 0
jmp 0x4995a2
xor edi, edi
mov dword [esp + 0x28], edi
xor esi, esi
add ecx, edi
adc esi, dword [esp + 0x28]
mov edi, ecx
mov ecx, dword [esp + 0x1c]
add edx, ecx
adc ebx, eax
cmp ebx, eax
mov dword [esp + 0x3c], edx
ja 0x4995d7
jb 0x4995c2
cmp edx, ecx
jae 0x4995d7
mov eax, 1
xor ecx, ecx
add edi, eax
adc esi, ecx
mov dword [esp + 0x18], 0x3f
jmp 0x4995f4
xor eax, eax
xor ecx, ecx
add edi, eax
adc esi, ecx
mov dword [esp + 0x18], 0x3f
jmp 0x4995f4
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
mov eax, edx
mov edx, ebx
call fcn.004fb2a0
mov ecx, edx
xor ecx, ecx
push ecx
push 2
push esi
and eax, 1
push edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], ecx
call fcn.004ebca0
mov ecx, dword [esp + 0x1c]
add ecx, eax
mov eax, dword [esp + 0x24]
adc eax, edx
push 0
mov esi, eax
mov eax, dword [esp + 0x3c]
push 2
push eax
push ebp
mov edi, ecx
call fcn.004ebca0
mov ebp, eax
mov eax, dword [esp + 0x30]
cmp eax, esi
mov dword [esp + 0x38], edx
ja 0x49965d
jb 0x49964f
cmp dword [esp + 0x2c], edi
ja 0x49965d
sub edi, dword [esp + 0x2c]
sbb esi, eax
add ebp, 1
adc dword [esp + 0x38], 0
sub dword [esp + 0x18], 1
jns 0x4995f0
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x48]
mov eax, ebp
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x40], ecx
mov dword [ebp + 0x20], eax
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, eax
or edx, ecx
je 0x499691
test eax, eax
jne 0x4996c9
cmp ecx, 0x80000000
jne 0x4996c9
cmp dword [ebp + 8], 0
jne 0x4996b9
cmp dword [ebp + 0xc], 0x80000000
jne 0x4996b9
cmp dword [esp + 0x14], 0
jne 0x4996b9
mov eax, dword [ebx + 0x28]
mov dword [ebp], eax
mov ecx, dword [ebx + 0x2c]
mov dword [ebp + 4], ecx
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], ecx
test eax, eax
jne 0x4996c9
cmp ecx, 0x80000000
je 0x499788
cmp dword [ebp + 8], 0
jne 0x499788
cmp dword [ebp + 0xc], 0x80000000
jne 0x499788
mov edi, dword [esp + 0x14]
mov esi, 1
add edi, esi
cmp edi, esi
mov dword [ebx + 0xa8], eax
mov dword [ebx + 0xac], ecx
jle 0x499738
or eax, 0xffffffff
sub eax, dword [esp + 0x14]
lea ecx, [ebx + 0xb0]
mov dword [esp + 0x4c], eax
jmp 0x499714
mov eax, dword [esp + 0x4c]
cmp dword [ecx], 0
jne 0x499738
cmp dword [ecx + 4], 0x80000000
jne 0x499738
add eax, esi
imul eax, dword [ebp + 0x20]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
add esi, 1
add ecx, 8
cmp esi, edi
jl 0x499710
xor edi, edi
cmp dword [esp + 0x14], edi
jle 0x499776
lea eax, [ebx + 0xa8]
mov edx, dword [eax + 0xc]
mov esi, dword [eax + 4]
cmp esi, edx
mov ecx, dword [eax + 8]
mov ebx, dword [eax]
jl 0x499772
jg 0x49975b
cmp ebx, ecx
jbe 0x499772
mov dword [eax + 8], ebx
mov dword [eax + 0xc], esi
mov dword [eax], ecx
mov dword [eax + 4], edx
add edi, 1
add eax, 8
cmp edi, dword [esp + 0x14]
jl 0x499746
mov ebx, dword [esp + 0x48]
mov edx, dword [ebx + 0xa8]
mov dword [ebp + 8], edx
mov eax, dword [ebx + 0xac]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 8]
mov dword [ebx + 0x78], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebx + 0x7c], edx
mov eax, dword [ebp + 8]
lea esi, [ebx + 0x28]
mov dword [esi], eax
mov ecx, dword [ebp + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ecx + 0xec]
sub eax, 0
je 0x499848
sub eax, 1
jne 0x499858
mov eax, dword [ecx + 0x58]
cmp eax, 1
mov ebp, dword [ebp + 0x14]
jg 0x499803
mov eax, dword [ecx + 0xf0]
call fcn.0047da80
test eax, eax
je 0x4997ed
mov ecx, dword [ecx + 0x50]
test ecx, ecx
je 0x499858
imul ecx, eax
lea eax, [ebp*8]
cdq
idiv ecx
jmp 0x499803
mov edi, dword [ecx + 0x10]
test edi, edi
je 0x499858
mov eax, dword [ecx + 0x4c]
imul eax, ebp
add eax, eax
add eax, eax
add eax, eax
cdq
idiv edi
mov edi, eax
test edi, edi
jl 0x499858
test ebp, ebp
jne 0x49982f
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov cl, 1
call fcn.0050de10
mov ecx, dword [ebx + 0x30]
cmp ecx, eax
jne 0x49982f
mov eax, dword [ebx + 0x34]
cmp eax, edx
jne 0x49982f
mov ecx, dword [esi]
or ecx, dword [esi + 4]
je 0x499858
mov eax, dword [ebx + 0x44]
imul edi
push edx
push eax
call fcn.00499a80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
mov eax, dword [ecx + 0x2c]
imul dword [ebx + 0x44]
push edx
push eax
call fcn.00499a80
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret