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

Disassembly:
sub esp, 0x34
mov eax, dword [esi]
test eax, eax
mov ecx, dword [esi + 4]
push ebx
push ebp
mov ebp, dword [esp + 0x44]
push edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
jne 0x4979b3
cmp ecx, 0x80000000
je 0x4979e9
mov edi, dword [esi + 8]
test edi, edi
mov ebx, dword [esi + 0xc]
jne 0x4979c5
cmp ebx, 0x80000000
je 0x4979e9
cmp ebx, ecx
jl 0x4979e9
jg 0x4979cf
cmp edi, eax
jbe 0x4979e9
mov ecx, dword [ebp + 0x48]
cmp ecx, 0x3f
jge 0x4979e9
mov eax, 1
shl eax, cl
cdq
sub edi, eax
sbb ebx, edx
mov dword [esi + 8], edi
mov dword [esi + 0xc], ebx
cmp dword [esi + 0x20], 0
jne 0x497b7f
mov eax, dword [esp + 0x4c]
push esi
push eax
mov eax, ebp
lea edi, [esp + 0x1c]
lea ebx, [esp + 0x18]
call fcn.00497780
mov ecx, dword [esp + 0x1c]
add esp, 8
test ecx, ecx
je 0x497b7f
mov edi, dword [esp + 0x10]
test edi, edi
je 0x497b7f
mov eax, dword [ebp + 0x40]
imul ecx
mov ecx, eax
mov eax, dword [ebp + 0x44]
mov dword [esp + 0x2c], edx
imul edi
push 0
mov edi, edx
mov edx, dword [esp + 0x30]
push 2
push edx
push ecx
mov dword [esp + 0x38], ecx
mov ebx, eax
call fcn.004ebce0
test edi, edi
mov ecx, eax
mov dword [esp + 0x18], ecx
mov eax, edx
jg 0x497a8d
jl 0x497a60
cmp ebx, 0x7fffffff
ja 0x497a8d
cmp dword [esp + 0x2c], 0
jg 0x497a8d
jl 0x497a73
cmp dword [esp + 0x28], 0x7fffffff
ja 0x497a8d
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
add ecx, ebx
push edx
adc eax, edi
push eax
push ecx
call fcn.004ebce0
jmp 0x497b78
mov ebp, ebx
xor ebx, ebx
mov ecx, edi
sar ecx, 0x1f
xor edx, edx
add edx, ebp
mov ebp, edi
adc ebp, ebx
cmp ebp, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
ja 0x497ab9
jb 0x497ab2
xor edi, edi
cmp edx, edi
jae 0x497ab9
mov ebx, 1
jmp 0x497abb
xor ebx, ebx
xor edi, edi
add ecx, ebx
mov ebx, edi
adc edi, ebx
add edx, dword [esp + 0x18]
mov ebx, ecx
adc ebp, eax
cmp ebp, eax
mov dword [esp + 0x38], edx
ja 0x497ae2
jb 0x497adb
cmp edx, dword [esp + 0x18]
jae 0x497ae2
mov eax, 1
jmp 0x497ae4
xor eax, eax
xor ecx, ecx
add ebx, eax
adc edi, ecx
mov dword [esp + 0x10], 0x3f
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov edx, ebp
call fcn.004fb2a0
mov ecx, edx
xor ecx, ecx
push ecx
push 2
push edi
and eax, 1
push ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call fcn.004ebca0
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x18]
adc eax, edx
push 0
mov edi, eax
mov eax, dword [esp + 0x28]
push 2
mov ebx, ecx
mov ecx, dword [esp + 0x28]
push eax
push ecx
call fcn.004ebca0
cmp dword [esp + 0x2c], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
ja 0x497b65
jb 0x497b53
cmp dword [esp + 0x28], ebx
ja 0x497b65
sub ebx, dword [esp + 0x28]
sbb edi, dword [esp + 0x2c]
add dword [esp + 0x20], 1
adc dword [esp + 0x24], 0
sub dword [esp + 0x10], 1
jns 0x497af2
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x3c], edx
mov dword [esi + 0x20], eax
mov ebx, dword [esp + 0x4c]
test ebx, ebx
je 0x497bee
cmp dword [ebp + 0x6c], 3
jne 0x497bee
mov eax, dword [esi + 0x14]
test eax, eax
je 0x497bee
mov ecx, dword [ebx + 0xb8]
cdq
push 5
push edx
push eax
mov eax, dword [esi + 0x20]
cdq
push edx
push eax
mov eax, dword [ebx + 0xbc]
push eax
push ecx
call fcn.004a8690
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
add esp, 0x1c
test ecx, ecx
jne 0x497bc9
cmp edi, 0x80000000
je 0x497bd2
add ecx, eax
adc edi, edx
mov dword [esi], ecx
mov dword [esi + 4], edi
mov ecx, dword [esi + 8]
test ecx, ecx
mov edi, dword [esi + 0xc]
jne 0x497be4
cmp edi, 0x80000000
je 0x497bee
add ecx, eax
adc edi, edx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edi
mov ecx, dword [ebp + 8]
call fcn.00497820
test eax, eax
je 0x497bfe
or dword [esi + 0x1c], 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x118]
test eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 0
je 0x497c29
test ebx, ebx
je 0x497c29
cmp dword [ebx + 0x20], 3
je 0x497c29
mov dword [esp + 0x14], 1
mov edx, dword [esi + 8]
mov edi, dword [esi + 0xc]
xor ebx, ebx
cmp edx, ebx
jne 0x497c3d
cmp edi, 0x80000000
je 0x497c60
mov eax, dword [esi]
cmp eax, ebx
mov ecx, dword [esi + 4]
jne 0x497c4e
cmp ecx, 0x80000000
je 0x497c60
cmp ecx, edi
jl 0x497c60
jg 0x497c58
cmp eax, edx
jbe 0x497c60
mov dword [esp + 0x14], 1
cmp dword [ebp + 0x78], ebx
jne 0x497c74
cmp dword [ebp + 0x7c], 0x80000000
jne 0x497c74
mov dword [ebp + 0x78], ebx
mov dword [ebp + 0x7c], ebx
cmp dword [esp + 0x10], 1
jg 0x497e63
cmp dword [esp + 0x14], ebx
je 0x497d25
cmp dword [esi + 8], ebx
jne 0x497ca9
cmp dword [esi + 0xc], 0x80000000
jne 0x497ca9
mov eax, dword [ebp + 0x88]
mov dword [esi + 8], eax
mov ecx, dword [ebp + 0x8c]
mov dword [esi + 0xc], ecx
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ecx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 8]
push eax
mov eax, dword [esi + 0x18]
push ecx
push edx
push eax
mov eax, dword [esp + 0x58]
call fcn.004978a0
add esp, 0x14
cmp dword [esi + 8], ebx
jne 0x497ce2
cmp dword [esi + 0xc], 0x80000000
jne 0x497ce2
mov ecx, dword [ebp + 0x78]
mov dword [esi + 8], ecx
mov edx, dword [ebp + 0x7c]
mov dword [esi + 0xc], edx
cmp dword [ebp + 0x80], ebx
jne 0x497cf3
mov eax, dword [esi + 0x20]
mov dword [ebp + 0x80], eax
mov eax, dword [ebp + 0x80]
cdq
add eax, dword [esi + 8]
adc edx, dword [esi + 0xc]
mov dword [ebp + 0x78], eax
mov dword [ebp + 0x7c], edx
mov ecx, dword [esi + 0x20]
mov dword [ebp + 0x80], ecx
mov edx, dword [esi]
mov dword [ebp + 0x88], edx
mov eax, dword [esi + 4]
mov dword [ebp + 0x8c], eax
jmp 0x497e63
mov ebx, dword [esi]
test ebx, ebx
mov eax, dword [esi + 4]
jne 0x497d55
cmp eax, 0x80000000
jne 0x497d55
cmp dword [esi + 8], ebx
jne 0x497e0d
cmp dword [esi + 0xc], eax
jne 0x497e0d
cmp dword [esi + 0x20], ebx
je 0x497e63
jmp 0x497e0d
mov eax, dword [esi + 0x20]
test eax, eax
je 0x497dff
mov ecx, dword [ebp + 0x7c]
cdq
mov edi, eax
mov eax, dword [ebp + 0x78]
mov dword [esp + 0x28], edi
mov ebp, eax
sub ebp, edi
mov edi, ecx
sbb edi, edx
mov dword [esp + 0x2c], edx
mov edx, ebp
mov ebp, dword [esi + 4]
sub edx, ebx
sbb edi, ebp
js 0x497d8a
jg 0x497d9a
test edx, edx
jae 0x497d9a
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
sub edx, eax
sbb edi, ecx
add edx, ebx
adc edi, ebp
mov dword [esp + 0x20], edx
mov edx, eax
sub edx, ebx
mov dword [esp + 0x30], edx
mov edx, ecx
sbb edx, ebp
mov dword [esp + 0x34], edx
js 0x497dc3
jg 0x497db9
cmp dword [esp + 0x30], 0
jb 0x497dc3
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
jmp 0x497dcb
mov edx, ebx
sub edx, eax
mov eax, ebp
sbb eax, ecx
cmp edi, eax
jg 0x497dfb
jl 0x497dd7
cmp dword [esp + 0x20], edx
jae 0x497dfb
mov eax, dword [esi + 0x20]
sar eax, 3
cdq
cmp edi, edx
jg 0x497dfb
jl 0x497dea
cmp dword [esp + 0x20], eax
jae 0x497dfb
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add eax, ebx
adc ecx, ebp
mov dword [esi], eax
mov dword [esi + 4], ecx
mov ebp, dword [esp + 0x48]
cmp dword [esi], 0
jne 0x497e18
cmp dword [esi + 4], 0x80000000
jne 0x497e18
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [esi], ecx
mov dword [esi + 4], edx
mov ecx, dword [esi + 4]
mov eax, dword [esi]
push ecx
push eax
push ecx
push eax
mov eax, dword [esi + 0x18]
push eax
mov eax, dword [esp + 0x58]
call fcn.004978a0
add esp, 0x14
cmp dword [esi], 0
jne 0x497e4a
cmp dword [esi + 4], 0x80000000
jne 0x497e4a
mov ecx, dword [ebp + 0x78]
mov dword [esi], ecx
mov edx, dword [ebp + 0x7c]
mov dword [esi + 4], edx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi]
mov edi, dword [esi + 4]
cdq
add eax, ecx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edi
adc edx, edi
mov dword [ebp + 0x78], eax
mov dword [ebp + 0x7c], edx
mov eax, dword [esi]
test eax, eax
mov ecx, dword [esi + 4]
jne 0x497e7c
cmp ecx, 0x80000000
je 0x497f6e
mov ebp, dword [esp + 0x48]
mov dword [ebp + 0xa8], eax
mov eax, dword [esp + 0x10]
mov edi, 1
lea ebx, [eax + 1]
cmp ebx, edi
mov dword [ebp + 0xac], ecx
jle 0x497ec8
lea ecx, [ebp + 0xb0]
or ebp, 0xffffffff
sub ebp, eax
cmp dword [ecx], 0
jne 0x497ec8
cmp dword [ecx + 4], 0x80000000
jne 0x497ec8
lea eax, [edi + ebp]
imul eax, dword [esi + 0x20]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
add edi, 1
add ecx, 8
cmp edi, ebx
jl 0x497ea3
xor ebx, ebx
cmp dword [esp + 0x10], ebx
jle 0x497f05
mov eax, dword [esp + 0x48]
add eax, 0xa8
mov edx, dword [eax + 0xc]
mov edi, dword [eax + 4]
cmp edi, edx
mov ecx, dword [eax + 8]
mov ebp, dword [eax]
jl 0x497f05
jg 0x497eee
cmp ebp, ecx
jbe 0x497f05
mov dword [eax + 8], ebp
mov dword [eax + 0xc], edi
mov dword [eax], ecx
mov dword [eax + 4], edx
add ebx, 1
add eax, 8
cmp ebx, dword [esp + 0x10]
jl 0x497ed9
cmp dword [esi + 8], 0
jne 0x497f2c
cmp dword [esi + 0xc], 0x80000000
jne 0x497f2c
mov edi, dword [esp + 0x48]
mov eax, dword [edi + 0xa8]
mov dword [esi + 8], eax
mov ecx, dword [edi + 0xac]
mov dword [esi + 0xc], ecx
jmp 0x497f30
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x10], 1
jle 0x497f56
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ecx, dword [esi + 0xc]
push edx
mov edx, dword [esi + 8]
push eax
mov eax, dword [esi + 0x18]
push ecx
push edx
push eax
mov eax, dword [esp + 0x58]
call fcn.004978a0
add esp, 0x14
mov eax, dword [esi + 0xc]
cmp eax, dword [edi + 0x7c]
mov ecx, dword [esi + 8]
jl 0x497f6e
jg 0x497f68
cmp ecx, dword [edi + 0x78]
jbe 0x497f6e
mov dword [edi + 0x78], ecx
mov dword [edi + 0x7c], eax
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x497f8a
mov ecx, 1
mov dword [esi + 0x1c], 0
cmp dword [eax + 0x20], ecx
jne 0x497f8a
mov dword [esi + 0x1c], ecx
pop edi
pop ebp
pop ebx
add esp, 0x34
ret