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

Disassembly:
push 0xffffffffffffffff
push 0x10081448
mov eax, dword fs:[0]
push eax
sub esp, 0x94
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10097288]
xor eax, esp
push eax
lea eax, [esp + 0xa8]
mov dword fs:[0], eax
mov dword [esp + 0x8c], ecx
mov ebx, dword [esp + 0xbc]
mov eax, dword [ebx]
mov ebp, dword [eax + 0x24]
mov dword [esp + 0x54], ebp
cmp ebp, 3
jle 0x1004b584
cmp byte [eax + 0x3c], 0
mov byte [esp + 0x1f], 1
jne 0x1004b589
mov byte [esp + 0x1f], 0
mov eax, dword [ecx + 0xc]
cmp ebp, 5
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0xcc]
sete byte [esp + 0x17]
mov dword [esp + 0x18], edx
cmp dword [eax + 0x58], 0
sete cl
xor eax, eax
test cl, cl
mov byte [esp + 0x4f], cl
lea ecx, [esp + 0x18]
setne al
push eax
push 1
push 0
call fcn.10041bf0
xor edi, edi
test ebp, ebp
jle 0x1004b61e
mov ebx, dword [esp + 0xcc]
mov ecx, dword [esp + 0x18]
mov esi, dword [ebx + edi*4 + 0x44]
inc esi
mov edx, dword [ecx + 4]
mov eax, edx
shr eax, 1
sub edx, eax
cmp esi, 1
jle 0x1004b5fc
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push esi
push 3
push 2
jmp 0x1004b609
mov dword [ecx + 4], edx
call fcn.10040a90
push esi
push 1
push 0
lea ecx, [esp + 0x24]
call fcn.10041bf0
inc edi
cmp edi, ebp
jl 0x1004b5d3
mov ebx, dword [esp + 0xbc]
mov ecx, dword [ebx]
xor ebp, ebp
mov ebx, dword [esp + 0xc4]
mov eax, ebx
mov edx, dword [esp + 0xc8]
sub eax, edx
inc eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x88], eax
imul eax, dword [ecx + 0x24]
test eax, eax
jle 0x1004bfa6
mov esi, dword [esp + 0xc0]
push esi
push ebp
push edx
mov edx, ecx
lea ecx, [esp + 0x30]
push ebx
call fcn.10052dd0
mov eax, dword [esp + 0xdc]
add esp, 0x10
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
cmp dword [eax + 0x58], 0
je 0x1004b68b
lea eax, [edi - 1]
cmp eax, 1
ja 0x1004b68b
cmp ebx, 2
jl 0x1004bf77
cmp byte [esp + 0x4f], 0
jne 0x1004b6df
mov ebp, dword [esp + 0x54]
dec ebp
je 0x1004b6db
mov ecx, dword [esp + 0x18]
mov eax, ebp
cdq
sub eax, edx
mov esi, eax
mov edx, dword [ecx + 4]
mov eax, edx
shr eax, 1
sar esi, 1
sub edx, eax
cmp edi, esi
jle 0x1004b6c6
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push edi
push ebp
lea eax, [esi + 1]
push eax
jmp 0x1004b6d2
mov dword [ecx + 4], edx
call fcn.10040a90
push edi
push esi
push 0
lea ecx, [esp + 0x24]
call fcn.10041bf0
mov ebp, dword [esp + 0x40]
mov ecx, dword [esp + 0xc0]
push edi
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, eax
mov eax, dword [esp + 0xc0]
push edi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 8]
cmp eax, esi
jge 0x1004bf70
mov esi, dword [esp + 0xcc]
mov ebp, dword [esi + edi*4 + 0x44]
mov dword [esp + 0x68], ebp
test ebp, ebp
jns 0x1004b73a
mov edx, dword [esp + 0xc0]
push ebx
mov ebx, dword [esp + 0xc0]
mov ecx, ebx
push edi
call fcn.1003adf0
mov ebp, eax
add esp, 8
mov dword [esp + 0x68], ebp
jmp 0x1004b741
mov ebx, dword [esp + 0xbc]
cmp dword [esi + edi*4 + 0x44], 0
jge 0x1004b782
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov eax, edx
shr eax, 1
sub edx, eax
cmp ebp, 1
jle 0x1004b76c
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push ebp
push 2
push 2
jmp 0x1004b779
mov dword [ecx + 4], edx
call fcn.10040a90
push ebp
push 1
push 0
lea ecx, [esp + 0x24]
call fcn.10041bf0
cmp dword [esp + 0xc8], 0
jne 0x1004b820
mov eax, dword [ebx]
mov esi, 1
mov edi, dword [eax + 0x18]
mov ebx, dword [eax + 0x14]
mov ebp, dword [eax + 0x24]
mov eax, dword [esp + 0x28]
inc eax
cdq
sub eax, edx
xor edx, edx
sar eax, 1
mov ecx, eax
lea eax, [edi - 1]
shl esi, cl
div esi
mov esi, 1
mov edi, dword [esp + 0x24]
inc eax
push eax
mov eax, dword [esp + 0x2c]
cdq
sub eax, edx
xor edx, edx
sar eax, 1
mov ecx, eax
lea eax, [ebx - 1]
shl esi, cl
div esi
inc eax
push eax
mov eax, dword [esp + 0xcc]
inc eax
imul eax, ebp
push edi
dec eax
push eax
push dword [esp + 0x50]
push 0
push 0x64
push dword [0x1009b7a4]
push dword [0x1009b7a0]
call fcn.1007f6f0
push dword [0x1009b7b4]
push dword [0x1009b7b0]
push edx
push eax
call fcn.1007f740
push eax
push 0x1008c670
push 2
call fcn.10052110
add esp, 0x20
cmp dword [esp + 0x54], 3
jle 0x1004b830
mov eax, dword [edi*4 + 0x1008c910]
jmp 0x1004b837
mov eax, dword [edi*4 + 0x1008c990]
push eax
lea ecx, [esp + 0x78]
call fcn.10018f50
mov dword [esp + 0xb0], 0
mov ebx, dword [esp + 0x28]
mov eax, ebx
and eax, 0x80000001
jns 0x1004b85e
dec eax
or eax, 0xfffffffe
inc eax
mov eax, dword [esp + 0xbc]
mov esi, dword [eax]
mov eax, dword [esi + 0x18]
jne 0x1004bbb0
mov dword [esp + 0x44], eax
mov ebp, 1
lea eax, [ebx + 1]
mov dword [esp + 0x20], ebp
cdq
sub eax, edx
mov edx, ebp
sar eax, 1
mov ecx, eax
mov eax, dword [esi + 0x18]
shl edx, cl
dec eax
mov dword [esp + 0x34], edx
xor edx, edx
div dword [esp + 0x34]
inc eax
cmp eax, ebp
jbe 0x1004bef2
mov eax, ebx
cdq
sub eax, edx
mov edx, ebp
sar eax, 1
mov ecx, eax
mov dword [esp + 0x64], eax
shl edx, cl
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x50], edx
lea eax, [ecx*4]
mov dword [esp + 0x30], eax
lea eax, [ecx*8]
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x14]
xor edx, edx
mov dword [esp + 0x3c], eax
dec eax
div dword [esp + 0x50]
mov ecx, dword [0x1009b7a0]
mov esi, dword [0x1009b7a4]
inc eax
add ecx, eax
mov dword [0x1009b7a0], ecx
adc esi, 0
cmp dword [esp + 0xc8], 0
mov dword [0x1009b7a4], esi
jne 0x1004b97d
mov eax, ebp
and eax, 0x101
cmp eax, 0x101
jne 0x1004b97d
mov eax, dword [esp + 0x44]
xor edx, edx
dec eax
mov ebx, dword [esp + 0xbc]
div dword [esp + 0x34]
xor edx, edx
inc eax
push eax
mov eax, dword [esp + 0x40]
dec eax
div dword [esp + 0x54]
mov edx, dword [ebx]
inc eax
push eax
mov eax, dword [esp + 0xcc]
inc eax
imul eax, dword [edx + 0x24]
push edi
dec eax
push eax
push dword [esp + 0x50]
push 0
push 0x64
push esi
push ecx
call fcn.1007f6f0
push dword [0x1009b7b4]
push dword [0x1009b7b0]
push edx
push eax
call fcn.1007f740
push eax
push 0x1008c694
push 3
call fcn.10052110
mov ebx, dword [esp + 0x48]
add esp, 0x20
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x3c], 0
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x4bda12f7
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x1004bb7c
xor eax, eax
mov dword [esp + 0x2c], eax
cmp dword [eax + esi + 0x58], 0
lea ebp, [eax + esi]
mov dword [esp + 0x44], ebp
jge 0x1004bb3d
mov ecx, dword [esp + 0x64]
mov esi, 1
mov eax, dword [ebp + 0x40]
xor edx, edx
shl esi, cl
mov ecx, dword [esp + 0x30]
mov eax, dword [eax + ecx]
div esi
mov ecx, dword [ebp + 0x4c]
xor edx, edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x30]
mov eax, dword [ecx + eax]
dec eax
div esi
mov esi, dword [esp + 0x48]
inc eax
mov dword [esp + 0x60], eax
cmp esi, eax
jae 0x1004bb39
cmp byte [esp + 0x1f], 0
je 0x1004ba23
cmp edi, 3
jge 0x1004ba23
mov ecx, dword [ebp + 0xc]
push esi
push dword [esp + 0x24]
mov eax, dword [ecx]
push ebx
call dword [eax + 8]
test eax, eax
je 0x1004bb2a
cmp byte [esp + 0x17], 0
je 0x1004ba45
cmp edi, 4
jge 0x1004ba45
mov ecx, dword [ebp + 0x10]
push esi
push dword [esp + 0x24]
mov eax, dword [ecx]
push ebx
call dword [eax + 8]
test eax, eax
jg 0x1004bb2a
push dword [esp + 0x68]
mov edx, dword [esp + 0xc4]
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x74]
push eax
push esi
push dword [esp + 0x30]
lea ecx, [esp + 0x88]
push edi
push ebx
push ebp
call fcn.10052a20
mov ecx, dword [ebp + edi*4]
add esp, 0x20
mov ebx, eax
mov edx, dword [ecx]
push esi
push dword [esp + 0x24]
push dword [esp + 0x30]
call dword [edx + 8]
cmp byte [esp + 0x17], 0
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0x5c], eax
je 0x1004bab6
cmp edi, 4
mov edi, dword [esp + 0x38]
jne 0x1004baaa
cmp edi, dword [esp + 0x3c]
cmovg edi, dword [esp + 0x3c]
mov dword [esp + 0x38], edi
cmp ebx, edi
jg 0x1004bab2
cmp ebx, ebp
jge 0x1004baba
mov ebx, ebp
jmp 0x1004baba
mov edi, dword [esp + 0x38]
imul eax, dword [esp + 0x24], 0x401c
sub edi, ebx
mov ecx, dword [esp + 0xb8]
sub ebp, ebx
add eax, dword [ecx]
mov dword [esp + 0x70], eax
cmp ebp, edi
je 0x1004bb1e
lea ecx, [esp + 0x74]
push ecx
mov ecx, eax
call fcn.10020f40
mov ecx, dword [esp + 0x70]
mov edx, ebp
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x5c]
sub eax, ebx
mov esi, dword [ecx]
add ecx, 4
push eax
mov dword [esp + 0x94], ecx
lea ecx, [esp + 0x94]
push edi
mov dword [esp + 0x9c], esi
call fcn.10050600
mov esi, dword [esp + 0x50]
add esp, 8
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x24]
inc esi
mov dword [esp + 0x48], esi
cmp esi, dword [esp + 0x60]
jb 0x1004ba01
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x3c]
add eax, 0x6c
mov dword [esp + 0x2c], eax
inc ebp
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x3c], ebp
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x4bda12f7
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
mov eax, dword [esp + 0x2c]
jl 0x1004b9b2
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x58]
xor edx, edx
add dword [esp + 0x30], eax
add ebp, 2
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x20], ebp
mov esi, dword [eax]
mov eax, dword [esi + 0x18]
mov dword [esp + 0x44], eax
dec eax
div dword [esp + 0x34]
inc eax
cmp ebp, eax
jb 0x1004b8d1
jmp 0x1004bef2
mov dword [esp + 0x50], eax
xor ebp, ebp
lea eax, [ebx + 1]
mov dword [esp + 0x20], ebp
cdq
sub eax, edx
mov edx, 1
sar eax, 1
mov ecx, eax
mov eax, dword [esi + 0x18]
shl edx, cl
dec eax
mov dword [esp + 0x2c], edx
xor edx, edx
div dword [esp + 0x2c]
inc eax
je 0x1004bef2
mov eax, ebx
mov dword [esp + 0x30], ebp
cdq
sub eax, edx
mov edx, 1
sar eax, 1
mov ecx, eax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x2c]
shl edx, cl
shl eax, 2
mov dword [esp + 0x44], edx
mov dword [esp + 0x84], eax
lea ebx, [ebx]
mov ebx, dword [esi + 0x14]
xor edx, edx
mov ecx, dword [0x1009b7a0]
mov esi, dword [0x1009b7a4]
lea eax, [ebx - 1]
div dword [esp + 0x44]
inc eax
shr eax, 1
add ecx, eax
mov dword [0x1009b7a0], ecx
adc esi, 0
cmp dword [esp + 0xc8], 0
mov dword [0x1009b7a4], esi
jne 0x1004bcb6
mov eax, ebp
and eax, 0x201
cmp eax, 0x201
jne 0x1004bcb6
mov eax, dword [esp + 0x50]
xor edx, edx
dec eax
div dword [esp + 0x2c]
xor edx, edx
inc eax
push eax
lea eax, [ebx - 1]
mov ebx, dword [esp + 0xc0]
div dword [esp + 0x48]
mov edx, dword [ebx]
inc eax
push eax
mov eax, dword [esp + 0xcc]
inc eax
imul eax, dword [edx + 0x24]
push edi
dec eax
push eax
push dword [esp + 0x50]
push 0
push 0x64
push esi
push ecx
call fcn.1007f6f0
push dword [0x1009b7b4]
push dword [0x1009b7b0]
push edx
push eax
call fcn.1007f740
push eax
push 0x1008c6b8
push 3
call fcn.10052110
add esp, 0x20
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x48], 0
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x4bda12f7
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x1004bec2
xor eax, eax
mov dword [esp + 0x34], eax
jmp 0x1004bcf0
cmp dword [eax + esi + 0x58], 0
lea ebp, [eax + esi]
mov dword [esp + 0x3c], ebp
jge 0x1004be83
mov ecx, dword [esp + 0x58]
mov esi, 1
mov eax, dword [ebp + 0x40]
xor edx, edx
shl esi, cl
mov ecx, dword [esp + 0x30]
mov eax, dword [eax + ecx]
div esi
mov ecx, dword [ebp + 0x4c]
xor edx, edx
mov ebx, eax
mov eax, dword [esp + 0x30]
mov eax, dword [ecx + eax]
dec eax
div esi
inc eax
or eax, 1
mov dword [esp + 0x64], eax
cmp ebx, 1
jbe 0x1004bd3f
test bl, 1
jne 0x1004bd3f
dec ebx
test ebx, ebx
mov ecx, 1
cmove ebx, ecx
cmp ebx, eax
jae 0x1004be7f
cmp byte [esp + 0x1f], 0
mov esi, dword [esp + 0x28]
je 0x1004bd77
cmp edi, 3
jge 0x1004bd77
mov ecx, dword [ebp + 0xc]
push ebx
push dword [esp + 0x24]
mov eax, dword [ecx]
push esi
call dword [eax + 8]
test eax, eax
je 0x1004be72
cmp byte [esp + 0x17], 0
je 0x1004bd99
cmp edi, 4
jge 0x1004bd99
mov ecx, dword [ebp + 0x10]
push ebx
push dword [esp + 0x24]
mov eax, dword [ecx]
push esi
call dword [eax + 8]
test eax, eax
jg 0x1004be72
push dword [esp + 0x68]
mov edx, dword [esp + 0xc4]
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x74]
push eax
push ebx
push dword [esp + 0x30]
lea ecx, [esp + 0x88]
push edi
push esi
push ebp
call fcn.10052a20
mov ecx, dword [esp + 0x5c]
add esp, 0x20
mov ebp, eax
mov ecx, dword [ecx + edi*4]
push ebx
push dword [esp + 0x24]
mov edx, dword [ecx]
push esi
call dword [edx + 8]
cmp byte [esp + 0x17], 0
mov esi, dword [esp + 0x38]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x6c]
je 0x1004be08
cmp edi, 4
jne 0x1004bdfe
cmp esi, dword [esp + 0x48]
cmovg esi, dword [esp + 0x48]
mov dword [esp + 0x38], esi
cmp ebp, esi
jg 0x1004be06
cmp ebp, eax
jge 0x1004be08
mov ebp, eax
mov edx, dword [esp + 0xb8]
sub eax, ebp
imul ecx, edi, 0x401c
sub esi, ebp
mov dword [esp + 0x70], eax
add ecx, dword [edx]
mov dword [esp + 0x60], ecx
cmp eax, esi
je 0x1004be6e
lea eax, [esp + 0x74]
push eax
call fcn.10020f40
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x70]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x5c]
mov edi, dword [ecx]
sub eax, ebp
add ecx, 4
mov dword [esp + 0xa0], edi
push eax
mov dword [esp + 0xa0], ecx
lea ecx, [esp + 0xa0]
push esi
call fcn.10050600
mov edi, dword [esp + 0x2c]
add esp, 8
mov ebp, dword [esp + 0x3c]
add ebx, 2
cmp ebx, dword [esp + 0x64]
jb 0x1004bd51
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x48]
add eax, 0x6c
mov dword [esp + 0x34], eax
inc ebp
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x48], ebp
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x4bda12f7
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
mov eax, dword [esp + 0x34]
jl 0x1004bcf0
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x84]
xor edx, edx
add dword [esp + 0x30], eax
inc ebp
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x20], ebp
mov esi, dword [eax]
mov eax, dword [esi + 0x18]
mov dword [esp + 0x50], eax
dec eax
div dword [esp + 0x2c]
inc eax
cmp ebp, eax
jb 0x1004bc10
cmp dword [esp + 0xc8], 0
jne 0x1004bf38
mov ebx, dword [esp + 0x8c]
mov eax, dword [ebx + 0xc]
cmp eax, dword [esp + 0x80]
jle 0x1004bf38
push eax
push 0x1008c6dc
push 3
call fcn.10052110
add esp, 0xc
push 0x1008c6f4
push 5
call fcn.10052110
mov eax, dword [ebx + 0xc]
add esp, 8
mov dword [esp + 0x80], eax
mov dword [esp + 0xb0], 0xffffffff
mov eax, dword [esp + 0x74]
test eax, eax
je 0x1004bf6c
push eax
call fcn.1006f76a
add esp, 4
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0xc0]
mov ebx, dword [esp + 0xbc]
inc ebp
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x40], ebp
mov ecx, dword [ebx]
mov ebx, dword [esp + 0xc4]
mov eax, dword [ecx + 0x24]
imul eax, dword [esp + 0x88]
cmp ebp, eax
jl 0x1004b653
mov eax, dword [esp + 0xcc]
cmp dword [eax + 0x58], 0
je 0x1004c00c
mov eax, dword [esp + 0x54]
cmp eax, 1
jle 0x1004c00c
test edx, edx
jne 0x1004c00c
lea edi, [eax - 1]
test edi, edi
je 0x1004c00c
mov ecx, dword [esp + 0x18]
mov eax, edi
cdq
sub eax, edx
mov esi, eax
mov edx, dword [ecx + 4]
mov eax, edx
shr eax, 1
sar esi, 1
sub edx, eax
cmp esi, 1
jge 0x1004bff6
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push 1
push edi
lea eax, [esi + 1]
push eax
jmp 0x1004c003
mov dword [ecx + 4], edx
call fcn.10040a90
push 1
push esi
push 0
lea ecx, [esp + 0x24]
call fcn.10041bf0
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret