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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x5c2b80]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], edi
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x499992
push eax
call dword [0x5c4b6c]
add esp, 4
mov ecx, dword [edi + 0x18]
cmp byte [ecx + 9], 0
je 0x4999a9
inc dword [ecx + 0xc]
cmp byte [ecx + 0xa], 0
jne 0x4999a9
call fcn.0048ed30
mov eax, dword [edi]
test eax, eax
je 0x4999c0
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4999c0
push eax
call dword [0x5c4b6c]
add esp, 4
mov ebx, dword [edi + 0x1c]
test ebx, ebx
je 0x4999d5
cmp ebx, 5
je 0x4999d5
cmp ebx, 6
jne 0x49a247
cmp dword [edi], 0
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 4]
mov dword [esp + 0x34], 0
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
je 0x499a07
cmp byte [ecx + 0x14], 2
jne 0x499a07
mov ebx, 5
jmp 0x499a51
xor ebx, ebx
cmp dword [edi + 0xc], ebx
jne 0x499a37
lea edx, [ebx + 2]
mov ecx, esi
call fcn.004916b0
mov ebx, eax
test ebx, ebx
jne 0x499a51
mov ecx, dword [edi + 4]
lea eax, [edi + 8]
push eax
lea edx, [ebx + 1]
mov dword [edi + 0xc], 1
call fcn.00497e80
add esp, 4
mov ecx, dword [edi + 0x18]
cmp byte [ecx + 8], 0
jne 0x499a51
xor edx, edx
call fcn.004916b0
mov ebx, eax
mov dword [esp + 0x34], 1
mov eax, dword [edi + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [edi + 4]
mov esi, dword [edx + 0x20]
mov eax, dword [eax + 4]
mov dword [esp + 0x30], esi
mov ecx, dword [eax + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x18], ecx
movzx eax, byte [eax + 5]
mov dword [esp + 0x24], eax
test ebx, ebx
jne 0x499a88
cmp eax, 5
jne 0x499a88
cmp esi, ecx
mov eax, 8
cmovne ebx, eax
mov edx, dword [edx + 0x2c]
xor eax, eax
mov dword [esp + 0x14], edx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
test ecx, ecx
js 0x499aa0
cmp eax, ecx
jge 0x499b10
mov esi, dword [edi + 0x10]
mov dword [esp + 0x48], esi
cmp esi, edx
ja 0x499b10
test ebx, ebx
jne 0x499b4b
mov eax, dword [edi + 0x18]
xor edx, edx
mov ecx, dword [eax + 4]
mov eax, dword [0x5c4a3c]
div dword [ecx + 0x20]
inc eax
cmp esi, eax
je 0x499b02
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x10]
push 2
push eax
mov edx, esi
call fcn.0048a9c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x499b02
mov esi, dword [esp + 0x10]
mov ecx, edi
mov edx, dword [esp + 0x48]
push eax
push dword [esi + 4]
call fcn.00499760
add esp, 8
mov ecx, esi
mov ebx, eax
call fcn.0048ae10
mov eax, dword [esp + 0x1c]
inc dword [edi + 0x10]
inc eax
mov edx, dword [esp + 0x14]
jmp 0x499a91
test ebx, ebx
jne 0x499b4b
mov eax, edx
mov dword [edi + 0x24], edx
sub eax, dword [edi + 0x10]
inc eax
mov dword [edi + 0x20], eax
cmp dword [edi + 0x10], edx
ja 0x499b54
cmp dword [edi + 0x28], ebx
jne 0x499f3f
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x58]
mov dword [edi + 0x2c], eax
mov dword [ecx + 0x58], edi
mov dword [edi + 0x28], 1
jmp 0x499f3f
cmp ebx, 0x65
jne 0x499f3f
test edx, edx
jne 0x499ba9
mov esi, dword [edi + 4]
cmp byte [esi + 9], dl
je 0x499b6f
inc dword [esi + 0xc]
cmp byte [esi + 0xa], dl
jne 0x499b6f
mov ecx, esi
call fcn.0048ed30
mov eax, dword [esi + 4]
mov dword [eax + 0x2c], 0
mov ecx, dword [esi + 4]
call fcn.004915c0
cmp byte [esi + 9], 0
mov ebx, eax
je 0x499b95
dec dword [esi + 0xc]
jne 0x499b95
mov ecx, esi
call fcn.0048ecf0
mov esi, 1
mov dword [esp + 0x14], esi
test ebx, ebx
je 0x499bad
cmp ebx, 0x65
jne 0x499bc4
jmp 0x499bad
mov esi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov edx, 1
mov ecx, dword [edi + 4]
inc eax
push eax
call fcn.00497f00
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x499f3f
mov ecx, dword [edi]
test ecx, ecx
je 0x499bd7
call fcn.004b8260
cmp dword [esp + 0x24], 5
jne 0x499c80
mov ecx, dword [edi + 4]
mov edx, 0xffef
mov dword [esp + 0x10], ecx
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
and word [eax + 0x16], dx
xor edx, edx
call fcn.004916b0
mov ebx, eax
test ebx, ebx
jne 0x499c6b
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov dword [esp + 0x48], eax
cmp byte [eax + 0x12], 2
jne 0x499c20
cmp byte [eax + 0x13], 2
je 0x499c6b
mov ecx, dword [esp + 0x10]
mov edx, 2
call fcn.004916b0
mov ebx, eax
test ebx, ebx
jne 0x499c6b
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x94]
cmp eax, dword [edx + 0x98]
jbe 0x499c56
call fcn.0048b240
jmp 0x499c5b
call fcn.0048b090
mov ebx, eax
test ebx, ebx
jne 0x499c6b
mov eax, dword [esp + 0x48]
mov word [eax + 0x12], 0x202
mov eax, dword [esp + 0x20]
mov ecx, 0xffef
and word [eax + 0x16], cx
test ebx, ebx
jne 0x499f3f
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
cmp eax, ecx
jge 0x499cbb
mov eax, ecx
cdq
idiv dword [esp + 0x30]
mov ecx, eax
lea eax, [ecx - 1]
add eax, esi
cdq
idiv ecx
xor edx, edx
mov esi, eax
mov eax, dword [edi + 4]
mov ecx, dword [eax + 4]
mov eax, dword [0x5c4a3c]
div dword [ecx + 0x20]
mov ecx, dword [esp + 0x14]
inc eax
cmp esi, eax
jne 0x499cc7
dec esi
jmp 0x499cc7
cdq
idiv ecx
mov ecx, dword [esp + 0x14]
mov esi, eax
imul esi, ecx
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x18]
jge 0x49a062
cdq
mov dword [esp + 0x3c], edx
push dword [esp + 0x3c]
mov dword [esp + 0x44], eax
mov eax, ecx
push dword [esp + 0x44]
cdq
push edx
push eax
call fcn.00530230
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
mov ecx, dword [eax + 0x3c]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x24], eax
lea ebx, [ebx]
cmp esi, eax
ja 0x499d7d
mov eax, dword [edi + 4]
xor edx, edx
mov ecx, dword [eax + 4]
mov eax, dword [0x5c4a3c]
div dword [ecx + 0x20]
inc eax
cmp esi, eax
je 0x499d72
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x1c]
push 0
push eax
mov edx, esi
call fcn.0048a9c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x499d72
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0x10]
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, edx
jbe 0x499d62
call fcn.0048b240
jmp 0x499d67
call fcn.0048b090
mov ecx, dword [esp + 0x1c]
mov ebx, eax
call fcn.0048ae10
mov eax, dword [esp + 0x24]
inc esi
test ebx, ebx
je 0x499d10
jmp 0x499d93
test ebx, ebx
jne 0x499d93
mov ecx, dword [esp + 0x2c]
xor edx, edx
push 1
call fcn.0048b5f0
add esp, 4
mov ebx, eax
mov eax, dword [0x5c4a3c]
add eax, dword [esp + 0x18]
cdq
mov esi, edx
mov ecx, eax
mov edx, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], esi
cmp esi, edx
jg 0x499dbd
jl 0x499dcd
mov eax, dword [esp + 0x20]
cmp ecx, eax
jae 0x499dc1
jmp 0x499dcd
mov eax, dword [esp + 0x20]
mov ecx, eax
mov dword [esp + 0x24], eax
mov esi, edx
mov dword [esp + 0x14], edx
mov eax, dword [0x5c4a3c]
add eax, dword [esp + 0x30]
cdq
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], edx
test ebx, ebx
jne 0x499f3f
mov edi, edx
lea esp, [esp]
cmp edi, esi
jg 0x499fc3
jl 0x499e02
cmp eax, ecx
jae 0x499fc3
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push ecx
push dword [esp + 0x44]
push dword [esp + 0x4c]
push edi
push eax
call fcn.0052ea70
mov ecx, dword [esp + 0x4c]
lea edx, [eax + 1]
call fcn.0048a9c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x499e56
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x18]
push edi
push dword [esp + 0x3c]
mov eax, dword [edx]
push dword [esp + 0x38]
push dword [ecx + 4]
mov eax, dword [eax + 0xc]
push edx
call eax
add esp, 0x14
mov ebx, eax
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x499f1b
test byte [ecx + 0x18], 0x40
mov esi, dword [ecx + 0x10]
mov dword [esp + 0x18], esi
je 0x499eb7
dec dword [esi + 0x78]
mov eax, dword [esi + 0x88]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 0x88], ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 0x98]
dec ecx
mov esi, dword [esi + 0x3c]
cdq
push edx
push eax
mov edi, dword [esi]
push 0
push ecx
call fcn.00530230
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x28]
add esp, 0x10
mov edi, dword [esp + 0x1c]
jmp 0x499ebc
call fcn.00485670
cmp dword [esi + 0x78], 0
jne 0x499f17
mov eax, dword [esi + 0xcc]
cmp dword [eax + 0xc], 0
jne 0x499f17
mov al, byte [esi + 0x10]
cmp al, 6
je 0x499f10
test al, al
je 0x499f10
cmp al, 2
jb 0x499efc
mov eax, dword [0x5cfa50]
test eax, eax
je 0x499ee8
call eax
mov ecx, esi
call fcn.0048b7c0
mov eax, dword [0x5cfa54]
test eax, eax
je 0x499f10
call eax
jmp 0x499f10
cmp byte [esi + 4], 0
jne 0x499f10
push 0
xor edx, edx
mov ecx, esi
call fcn.00487e10
add esp, 4
mov ecx, esi
call fcn.00487c80
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
adc edi, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], edi
test ebx, ebx
je 0x499df0
mov edi, dword [esp + 0x28]
cmp dword [esp + 0x34], 0
je 0x49a236
mov ecx, dword [edi + 0x18]
xor edx, edx
call fcn.00492410
mov esi, dword [edi + 0x18]
mov dword [esp + 0x48], esi
cmp byte [esi + 8], 0
je 0x49a236
cmp byte [esi + 9], 0
je 0x499f7b
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x499f7b
mov ecx, esi
call fcn.0048ed30
cmp byte [esi + 8], 2
jne 0x49a21d
mov edx, dword [esi + 4]
mov dword [esp + 0x34], edx
mov eax, dword [edx]
mov dword [esp + 0x10], eax
mov ecx, dword [eax + 0x28]
test ecx, ecx
jne 0x49a224
cmp byte [eax + 0x10], 2
jne 0x49a198
cmp byte [eax + 4], cl
je 0x49a198
cmp byte [eax + 5], 1
jne 0x49a198
mov byte [eax + 0x10], 1
jmp 0x49a1cd
test ebx, ebx
jne 0x499f3b
mov esi, dword [esp + 0x48]
lea ecx, [esp + 0x48]
push ecx
push esi
mov eax, dword [esi]
mov eax, dword [eax + 0x18]
call eax
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x499f3b
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x4c], ecx
jl 0x49a011
jg 0x499fff
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x48], eax
jbe 0x49a011
mov eax, dword [esi]
push ecx
push dword [esp + 0x24]
mov eax, dword [eax + 0x10]
push esi
call eax
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x499f3b
mov esi, dword [esp + 0x2c]
mov ecx, dword [esi + 0x3c]
cmp dword [ecx], ebx
je 0x49a041
mov eax, dword [ecx]
push ebx
push 0x15
push ecx
mov eax, dword [eax + 0x28]
call eax
mov ebx, eax
add esp, 0xc
cmp ebx, 0xc
jne 0x49a03d
xor ebx, ebx
jmp 0x49a041
test ebx, ebx
jne 0x49a05c
cmp byte [esi + 7], 0
jne 0x49a05c
mov eax, dword [esi + 0x3c]
movzx edx, byte [esi + 0xb]
push edx
push eax
mov ecx, dword [eax]
mov eax, dword [ecx + 0x14]
call eax
add esp, 8
mov ebx, eax
mov edi, dword [esp + 0x28]
jmp 0x49a079
mov eax, dword [esp + 0x2c]
xor edx, edx
push 0
mov ecx, eax
mov dword [eax + 0x18], esi
call fcn.0048b5f0
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x499f3f
mov esi, dword [edi + 4]
cmp byte [esi + 8], bl
je 0x49a136
cmp byte [esi + 9], bl
je 0x49a0a1
inc dword [esi + 0xc]
cmp byte [esi + 0xa], bl
jne 0x49a0a1
mov ecx, esi
call fcn.0048ed30
cmp byte [esi + 8], 2
jne 0x49a11d
mov ecx, dword [esi + 4]
mov dword [esp + 0x10], ecx
mov eax, dword [ecx]
mov dword [esp + 0x48], eax
mov ebx, dword [eax + 0x28]
test ebx, ebx
jne 0x49a179
cmp byte [eax + 0x10], 2
jne 0x49a140
cmp byte [eax + 4], bl
je 0x49a140
cmp byte [eax + 5], 1
jne 0x49a140
mov byte [eax + 0x10], 1
dec dword [esi + 0x14]
mov eax, dword [ecx + 0x3c]
mov byte [ecx + 0x14], 1
mov dword [esp + 0x48], eax
test eax, eax
je 0x49a116
cmp dword [eax + 8], 0
je 0x49a109
lea ebx, [eax + 0xc]
mov edi, 0x7d
mov ecx, dword [ebx]
call fcn.00485180
lea ebx, [ebx + 4]
dec edi
jne 0x49a0f4
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x48]
push eax
call fcn.0047cef0
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [ecx + 0x3c], 0
mov ecx, esi
call fcn.004924b0
cmp byte [esi + 9], 0
je 0x49a136
dec dword [esi + 0xc]
jne 0x49a136
mov ecx, esi
call fcn.0048ecf0
mov ebx, 0x65
jmp 0x499f3f
movzx edx, byte [eax + 0x13]
mov ecx, eax
inc dword [eax + 0x64]
push 1
call fcn.00487e10
mov ebx, eax
add esp, 4
movzx eax, bl
cmp eax, 0xd
je 0x49a162
cmp eax, 0xa
jne 0x49a16d
mov eax, dword [esp + 0x48]
mov dword [eax + 0x28], ebx
mov byte [eax + 0x10], 6
mov ecx, dword [esp + 0x10]
test ebx, ebx
je 0x49a0d4
cmp byte [esi + 9], 0
je 0x499f3f
dec dword [esi + 0xc]
jne 0x499f3f
mov ecx, esi
call fcn.0048ecf0
jmp 0x499f3f
movzx edx, byte [eax + 0x13]
mov ecx, eax
inc dword [eax + 0x64]
push 1
call fcn.00487e10
mov ecx, eax
add esp, 4
movzx eax, cl
cmp eax, 0xd
je 0x49a1ba
cmp eax, 0xa
jne 0x49a1c5
mov eax, dword [esp + 0x10]
mov dword [eax + 0x28], ecx
mov byte [eax + 0x10], 6
mov edx, dword [esp + 0x34]
test ecx, ecx
jne 0x49a224
dec dword [esi + 0x14]
mov eax, dword [edx + 0x3c]
mov byte [edx + 0x14], 1
mov dword [esp + 0x10], eax
test eax, eax
je 0x49a216
cmp dword [eax + 8], 0
je 0x49a209
lea edi, [eax + 0xc]
mov esi, 0x7d
lea ecx, [ecx]
mov ecx, dword [edi]
call fcn.00485180
lea edi, [edi + 4]
dec esi
jne 0x49a1f0
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
push eax
call fcn.0047cef0
mov edx, dword [esp + 0x38]
add esp, 4
mov dword [edx + 0x3c], 0
mov ecx, esi
call fcn.004924b0
cmp byte [esi + 9], 0
je 0x49a236
dec dword [esi + 0xc]
jne 0x49a236
mov ecx, esi
call fcn.0048ecf0
cmp ebx, 0xc0a
mov eax, 7
cmove ebx, eax
mov dword [edi + 0x1c], ebx
mov eax, dword [edi]
test eax, eax
je 0x49a25e
mov eax, dword [eax + 0xc]
test eax, eax
je 0x49a25e
push eax
call dword [0x5c4b74]
add esp, 4
mov ecx, dword [edi + 0x18]
cmp byte [ecx + 9], 0
je 0x49a271
dec dword [ecx + 0xc]
jne 0x49a271
call fcn.0048ecf0
mov ecx, dword [edi + 0x14]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x49a285
push eax
call dword [0x5c4b74]
add esp, 4
mov ecx, dword [esp + 0x54]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052ab62
mov esp, ebp
pop ebp
ret