Function at 0x100498a0
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 0x100498f4
cmp byte [eax + 0x3c], 0
mov byte [esp + 0x1f], 1
jne 0x100498f9
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 0x1004998e
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 0x1004996c
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push esi
push 3
push 2
jmp 0x10049979
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 0x10049943
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 0x1004a316
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 0x100499fb
lea eax, [edi - 1]
cmp eax, 1
ja 0x100499fb
cmp ebx, 2
jl 0x1004a2e7
cmp byte [esp + 0x4f], 0
jne 0x10049a4f
mov ebp, dword [esp + 0x54]
dec ebp
je 0x10049a4b
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 0x10049a36
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push edi
push ebp
lea eax, [esi + 1]
push eax
jmp 0x10049a42
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 0x1004a2e0
mov esi, dword [esp + 0xcc]
mov ebp, dword [esi + edi*4 + 0x44]
mov dword [esp + 0x68], ebp
test ebp, ebp
jns 0x10049aaa
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 0x10049ab1
mov ebx, dword [esp + 0xbc]
cmp dword [esi + edi*4 + 0x44], 0
jge 0x10049af2
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov eax, edx
shr eax, 1
sub edx, eax
cmp ebp, 1
jle 0x10049adc
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push ebp
push 2
push 2
jmp 0x10049ae9
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 0x10049b90
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 0x1008c4b0
push 2
call fcn.10052110
add esp, 0x20
cmp dword [esp + 0x54], 3
jle 0x10049ba0
mov eax, dword [edi*4 + 0x1008c910]
jmp 0x10049ba7
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 0x10049bce
dec eax
or eax, 0xfffffffe
inc eax
mov eax, dword [esp + 0xbc]
mov esi, dword [eax]
mov eax, dword [esi + 0x18]
jne 0x10049f20
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 0x1004a262
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 0x10049ced
mov eax, ebp
and eax, 0x101
cmp eax, 0x101
jne 0x10049ced
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 0x1008c4d4
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 0x10049eec
xor eax, eax
mov dword [esp + 0x2c], eax
cmp dword [eax + esi + 0x58], 0
lea ebp, [eax + esi]
mov dword [esp + 0x44], ebp
jge 0x10049ead
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 0x10049ea9
cmp byte [esp + 0x1f], 0
je 0x10049d93
cmp edi, 3
jge 0x10049d93
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 0x10049e9a
cmp byte [esp + 0x17], 0
je 0x10049db5
cmp edi, 4
jge 0x10049db5
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 0x10049e9a
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 0x10049e26
cmp edi, 4
mov edi, dword [esp + 0x38]
jne 0x10049e1a
cmp edi, dword [esp + 0x3c]
cmovg edi, dword [esp + 0x3c]
mov dword [esp + 0x38], edi
cmp ebx, edi
jg 0x10049e22
cmp ebx, ebp
jge 0x10049e2a
mov ebx, ebp
jmp 0x10049e2a
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 0x10049e8e
lea ecx, [esp + 0x74]
push ecx
mov ecx, eax
call fcn.10020da0
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.10050000
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 0x10049d71
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 0x10049d22
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 0x10049c41
jmp 0x1004a262
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 0x1004a262
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 0x1004a026
mov eax, ebp
and eax, 0x201
cmp eax, 0x201
jne 0x1004a026
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 0x1008c4f8
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 0x1004a232
xor eax, eax
mov dword [esp + 0x34], eax
jmp 0x1004a060
cmp dword [eax + esi + 0x58], 0
lea ebp, [eax + esi]
mov dword [esp + 0x3c], ebp
jge 0x1004a1f3
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 0x1004a0af
test bl, 1
jne 0x1004a0af
dec ebx
test ebx, ebx
mov ecx, 1
cmove ebx, ecx
cmp ebx, eax
jae 0x1004a1ef
cmp byte [esp + 0x1f], 0
mov esi, dword [esp + 0x28]
je 0x1004a0e7
cmp edi, 3
jge 0x1004a0e7
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 0x1004a1e2
cmp byte [esp + 0x17], 0
je 0x1004a109
cmp edi, 4
jge 0x1004a109
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 0x1004a1e2
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 0x1004a178
cmp edi, 4
jne 0x1004a16e
cmp esi, dword [esp + 0x48]
cmovg esi, dword [esp + 0x48]
mov dword [esp + 0x38], esi
cmp ebp, esi
jg 0x1004a176
cmp ebp, eax
jge 0x1004a178
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 0x1004a1de
lea eax, [esp + 0x74]
push eax
call fcn.10020da0
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.10050000
mov edi, dword [esp + 0x2c]
add esp, 8
mov ebp, dword [esp + 0x3c]
add ebx, 2
cmp ebx, dword [esp + 0x64]
jb 0x1004a0c1
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 0x1004a060
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 0x10049f80
cmp dword [esp + 0xc8], 0
jne 0x1004a2a8
mov ebx, dword [esp + 0x8c]
mov eax, dword [ebx + 0xc]
cmp eax, dword [esp + 0x80]
jle 0x1004a2a8
push eax
push 0x1008c51c
push 3
call fcn.10052110
add esp, 0xc
push 0x1008c534
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 0x1004a2dc
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 0x100499c3
mov eax, dword [esp + 0xcc]
cmp dword [eax + 0x58], 0
je 0x1004a37c
mov eax, dword [esp + 0x54]
cmp eax, 1
jle 0x1004a37c
test edx, edx
jne 0x1004a37c
lea edi, [eax - 1]
test edi, edi
je 0x1004a37c
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 0x1004a366
add dword [ecx + 8], edx
mov dword [ecx + 4], eax
call fcn.10040a90
push 1
push edi
lea eax, [esi + 1]
push eax
jmp 0x1004a373
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