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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0xc]
push edi
test eax, eax
je 0x10059263
push eax
call dword [0x1011f230]
add esp, 4
mov edi, dword [esi + 0x18]
call fcn.1004f810
mov eax, dword [esi]
test eax, eax
je 0x10059282
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10059282
push eax
call dword [0x1011f230]
add esp, 4
mov ebx, dword [esi + 0x1c]
test ebx, ebx
je 0x10059297
cmp ebx, 5
je 0x10059297
cmp ebx, 6
jne 0x100599cf
cmp dword [esi], 0
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
mov ecx, dword [esi + 4]
mov dword [esp + 0x34], edx
mov edx, dword [ecx + 4]
mov edx, dword [edx]
mov dword [esp + 0x28], edx
mov dword [esp + 0x38], 0
je 0x100592cf
mov eax, dword [eax + 4]
cmp byte [eax + 0x14], 2
jne 0x100592cf
mov ebx, 5
jmp 0x10059494
xor ebx, ebx
cmp dword [esi + 0xc], ebx
jne 0x10059303
push 2
push ecx
call fcn.100520a0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10059494
mov eax, dword [esi + 4]
lea ecx, [esi + 8]
push ecx
push 1
mov dword [esi + 0xc], 1
call fcn.10057800
add esp, 8
mov edi, dword [esi + 0x18]
cmp byte [edi + 8], 0
jne 0x10059494
mov esi, dword [edi + 4]
xor ebx, ebx
mov dword [esp + 0x10], ebx
call fcn.1004f810
mov al, byte [edi + 8]
cmp al, 2
je 0x10059461
cmp al, 1
je 0x10059461
movzx edx, word [esi + 0x16]
test dl, 0x40
je 0x1005934e
mov eax, dword [esi + 0x4c]
cmp dword [eax], ebx
je 0x1005934e
mov dword [esp + 0x10], 0x106
jmp 0x10059461
cmp byte [edi + 9], 0
mov eax, dword [edi + 4]
je 0x10059395
cmp dword [eax + 0x4c], edi
je 0x1005936f
test byte [eax + 0x16], 0x20
je 0x1005936f
mov dword [esp + 0x10], 0x106
jmp 0x10059461
mov eax, dword [eax + 0x48]
cmp eax, ebx
je 0x10059395
mov ecx, 1
jmp 0x10059380
cmp dword [eax], edi
je 0x1005938e
cmp dword [eax + 4], ecx
jne 0x1005938e
cmp byte [eax + 8], cl
jne 0x10059341
mov eax, dword [eax + 0xc]
cmp eax, ebx
jne 0x10059380
mov eax, edx
and eax, 0xfff7
mov dword [esp + 0x10], ebx
mov word [esi + 0x16], ax
cmp dword [esi + 0x2c], ebx
jne 0x100593b0
or eax, 8
mov word [esi + 0x16], ax
cmp dword [esi + 0xc], 0
jne 0x100593c7
mov ebx, esi
call fcn.10051c90
mov dword [esp + 0x10], eax
test eax, eax
je 0x100593b0
jmp 0x100593ce
cmp dword [esp + 0x10], 0
je 0x100593ee
cmp byte [esi + 0x14], 0
jne 0x100593ee
mov eax, dword [esi + 0xc]
test eax, eax
je 0x100593ee
mov ecx, dword [eax + 0x44]
push ecx
call fcn.1004bd30
add esp, 4
mov dword [esi + 0xc], 0
cmp byte [esp + 0x10], 5
jne 0x1005942d
cmp byte [esi + 0x14], 0
jne 0x1005942d
mov ebx, dword [esi + 4]
add ebx, 0x1bc
je 0x1005942d
mov ecx, dword [ebx]
test ecx, ecx
je 0x1005942d
mov eax, dword [ebx + 8]
test eax, eax
jl 0x1005942d
mov edx, dword [ebx + 4]
push eax
push edx
call ecx
add esp, 8
test eax, eax
je 0x10059426
inc dword [ebx + 8]
jmp 0x100593b0
mov dword [ebx + 8], 0xffffffff
cmp dword [esp + 0x10], 0
jne 0x10059461
cmp byte [edi + 8], 0
jne 0x10059453
inc dword [esi + 0x28]
cmp byte [edi + 9], 0
je 0x10059453
mov byte [edi + 0x24], 1
mov eax, dword [esi + 0x48]
lea ecx, [edi + 0x1c]
mov dword [edi + 0x28], eax
mov dword [esi + 0x48], ecx
mov byte [edi + 8], 1
cmp byte [esi + 0x14], 1
jae 0x10059461
mov byte [esi + 0x14], 1
cmp byte [edi + 9], 0
je 0x10059485
add dword [edi + 0xc], 0xffffffff
jne 0x10059485
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x10059481
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
mov ebx, dword [esp + 0x10]
mov esi, dword [ebp + 8]
mov dword [esp + 0x38], 1
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 4]
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + 0x20]
mov eax, dword [eax]
movzx eax, byte [eax + 5]
mov edx, dword [ecx + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x3c], eax
test ebx, ebx
jne 0x100594c8
cmp eax, 5
jne 0x100594c8
cmp edx, edi
je 0x100594c8
lea ebx, [eax + 3]
mov ecx, dword [ecx + 0x2c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], 0
mov eax, dword [ebp + 0xc]
test eax, eax
jl 0x100594e4
cmp dword [esp + 0x2c], eax
jge 0x10059552
mov edi, dword [esi + 0x10]
cmp edi, dword [esp + 0x10]
ja 0x10059552
test ebx, ebx
jne 0x10059594
mov edx, dword [esi + 0x18]
mov ecx, dword [edx + 4]
mov eax, dword [0x1011f2e0]
xor edx, edx
div dword [ecx + 0x20]
inc eax
cmp edi, eax
je 0x10059544
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x30]
push edx
push edi
lea ecx, [ebx + 2]
call fcn.1004b9b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10059544
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 4]
push ebx
push eax
push edi
push esi
call fcn.10059010
mov ecx, dword [esp + 0x40]
push ecx
mov ebx, eax
call fcn.1004bd30
add esp, 0x14
mov eax, 1
add dword [esi + 0x10], eax
add dword [esp + 0x2c], eax
jmp 0x100594d7
test ebx, ebx
jne 0x10059594
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
mov edx, eax
sub edx, ecx
inc edx
mov dword [esi + 0x24], eax
mov dword [esi + 0x20], edx
cmp ecx, eax
ja 0x100595a1
cmp dword [esi + 0x28], ebx
jne 0x100598d0
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x58]
add eax, 0x58
mov dword [esi + 0x2c], edx
mov dword [eax], esi
mov dword [esi + 0x28], 1
jmp 0x100598d0
cmp ebx, 0x65
jne 0x100598d0
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x100595c0
mov eax, dword [esi + 4]
call fcn.10052050
mov ebx, eax
mov dword [esp + 0x10], 1
test ebx, ebx
je 0x100595c0
cmp ebx, 0x65
jne 0x1005963c
mov edi, dword [esi + 4]
mov ebx, dword [esi + 8]
mov eax, dword [edi + 4]
inc ebx
mov dword [esp + 0x30], eax
call fcn.1004f810
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + 0xc]
mov edx, dword [eax + 0x38]
mov eax, dword [eax + 0x44]
push eax
mov dword [esp + 0x34], edx
call fcn.1004c110
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x10059614
mov eax, dword [esp + 0x30]
mov ecx, ebx
shr ecx, 0x18
mov byte [eax + 0x28], cl
mov edx, ebx
shr edx, 0x10
mov ecx, ebx
shr ecx, 8
mov byte [eax + 0x29], dl
mov byte [eax + 0x2a], cl
mov byte [eax + 0x2b], bl
cmp byte [edi + 9], 0
je 0x10059638
add dword [edi + 0xc], 0xffffffff
jne 0x10059638
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x10059634
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
mov ebx, dword [esp + 0x2c]
test ebx, ebx
jne 0x100598d0
mov eax, dword [esi]
test eax, eax
je 0x1005964f
call fcn.100736c0
cmp dword [esp + 0x3c], 5
jne 0x1005966e
mov eax, dword [esi + 4]
push 2
push eax
call fcn.10058bf0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100598d0
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x1c], ecx
jge 0x100596a6
mov eax, ecx
cdq
idiv dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, eax
lea eax, [ecx + edx - 1]
cdq
idiv ecx
xor edx, edx
mov edi, eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 4]
mov eax, dword [0x1011f2e0]
div dword [ecx + 0x20]
inc eax
cmp edi, eax
jne 0x100596b6
dec edi
jmp 0x100596b6
mov eax, dword [esp + 0x1c]
cdq
idiv dword [esp + 0x20]
mov edi, eax
imul edi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
cmp dword [esp + 0x1c], edx
jge 0x10059ac1
mov eax, dword [esp + 0x1c]
cdq
mov ecx, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x10]
push ecx
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x44]
cdq
push ecx
push edx
push eax
call fcn.100e8ee0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x14], edx
mov edx, dword [eax + 0x3c]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x3c], eax
nop
cmp edi, dword [esp + 0x3c]
ja 0x10059758
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + 4]
mov eax, dword [0x1011f2e0]
xor edx, edx
div dword [ecx + 0x20]
inc eax
cmp edi, eax
je 0x10059751
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x30]
push edx
push edi
xor ecx, ecx
call fcn.1004b9b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x10059751
mov eax, dword [esp + 0x30]
push eax
call fcn.1004c110
mov ecx, dword [esp + 0x34]
add esp, 4
push ecx
mov ebx, eax
call fcn.1004bd30
add esp, 4
inc edi
test ebx, ebx
je 0x10059700
jmp 0x1005976d
test ebx, ebx
jne 0x1005976d
mov eax, dword [esp + 0x28]
push 1
push ebx
call fcn.1004c390
add esp, 8
mov ebx, eax
mov edx, dword [esp + 0x20]
mov edi, dword [0x1011f2e0]
mov ecx, dword [esp + 0x14]
lea eax, [edi + edx]
cdq
cmp edx, ecx
jg 0x10059791
jl 0x1005978b
cmp eax, dword [esp + 0x10]
jae 0x10059791
mov dword [esp + 0x4c], edx
jmp 0x10059799
mov eax, dword [esp + 0x10]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x48], eax
lea eax, [edi + ecx]
cdq
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
test ebx, ebx
jne 0x100598d0
jmp 0x100597c0
mov edx, dword [esp + 0x4c]
cmp dword [esp + 0x24], edx
jg 0x10059a2a
jl 0x100597de
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x20], eax
jae 0x10059a2a
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
push ecx
push edi
mov dword [esp + 0x44], 0
call fcn.100e90d0
inc eax
push eax
mov eax, dword [esp + 0x3c]
xor ecx, ecx
call fcn.1004b9b0
mov esi, dword [esp + 0x38]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1005983e
mov ebx, dword [esp + 0x24]
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx]
push ebx
push edi
mov edi, dword [esp + 0x24]
push edi
push eax
mov eax, dword [edx + 0xc]
push ecx
call eax
add esp, 0x14
mov ebx, eax
test esi, esi
je 0x100598b5
test byte [esi + 0x18], 0x40
mov edi, dword [esi + 0x10]
je 0x10059893
dec dword [edi + 0x78]
mov ecx, dword [edi + 0x88]
mov dword [esi + 0xc], ecx
mov eax, dword [edi + 0x3c]
mov dword [edi + 0x88], esi
mov eax, dword [eax]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x14]
push edx
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x98]
cdq
push edx
push eax
dec ecx
push 0
push ecx
call fcn.100e8ee0
push edx
push eax
mov eax, dword [edi + 0x3c]
push eax
mov eax, dword [esp + 0x4c]
mov edx, dword [eax + 0x48]
call edx
add esp, 0x10
jmp 0x1005989a
mov eax, esi
call fcn.10046cf0
cmp dword [edi + 0x78], 0
jne 0x100598b5
mov eax, dword [edi + 0xcc]
cmp dword [eax + 0xc], 0
jne 0x100598b5
push edi
call fcn.100491d0
add esp, 4
mov ecx, dword [esp + 0x40]
add dword [esp + 0x20], ecx
mov edx, dword [esp + 0x44]
adc dword [esp + 0x24], edx
test ebx, ebx
je 0x100597c0
mov esi, dword [ebp + 8]
cmp dword [esp + 0x38], 0
je 0x100599bf
mov eax, dword [esi + 0x18]
push 0
call fcn.10052e80
mov eax, dword [esi + 0x18]
add esp, 4
cmp byte [eax + 8], 0
mov dword [esp + 0x10], eax
je 0x100599bf
mov edi, eax
call fcn.1004f810
mov eax, edi
cmp byte [eax + 8], 2
jne 0x10059990
mov ecx, edi
mov ecx, dword [ecx + 4]
mov edi, dword [ecx]
mov eax, dword [edi + 0x28]
mov dword [esp + 0x34], ecx
test eax, eax
jne 0x10059c55
cmp byte [edi + 0xf], 2
jne 0x10059c1f
cmp byte [edi + 4], al
je 0x10059c1f
cmp byte [edi + 5], 1
jne 0x10059c1f
mov byte [edi + 0xf], 1
mov edi, dword [ecx + 0x3c]
mov byte [ecx + 0x14], 1
mov dword [esp + 0x3c], edi
test edi, edi
je 0x10059989
cmp dword [edi + 8], 0
je 0x1005997c
add edi, 0xc
mov dword [esp + 0x38], 0x7d
mov ecx, dword [edi]
push ecx
call fcn.10046730
add esp, 4
add edi, 4
sub dword [esp + 0x38], 1
jne 0x10059963
mov edi, dword [esp + 0x3c]
push edi
call fcn.1003fb70
mov ecx, dword [esp + 0x38]
add esp, 4
mov dword [ecx + 0x3c], 0
mov edi, dword [esp + 0x10]
mov eax, edi
call fcn.10052f30
cmp byte [edi + 9], 0
je 0x100599bf
add dword [edi + 0xc], 0xffffffff
jne 0x100599bf
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x100599bb
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
cmp ebx, 0xc0a
jne 0x100599cc
mov ebx, 7
mov dword [esi + 0x1c], ebx
mov eax, dword [esi]
test eax, eax
je 0x100599e6
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100599e6
push eax
call dword [0x1011f238]
add esp, 4
mov edi, dword [esi + 0x18]
cmp byte [edi + 9], 0
je 0x10059a0d
add dword [edi + 0xc], 0xffffffff
jne 0x10059a0d
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x10059a09
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x10059a21
push eax
call dword [0x1011f238]
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x100598cd
mov esi, dword [esp + 0x2c]
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
lea ecx, [esp + 0x48]
push ecx
push esi
call edx
add esp, 8
test eax, eax
jne 0x10059a73
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x14]
cmp edx, ecx
jl 0x10059a73
jg 0x10059a62
mov edx, dword [esp + 0x48]
cmp edx, dword [esp + 0x10]
jbe 0x10059a73
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [esp + 0x14]
push ecx
push esi
call edx
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x100598cd
mov ecx, dword [esp + 0x28]
cmp byte [ecx + 7], al
jne 0x10059a9e
movzx eax, byte [ecx + 0xb]
mov ecx, dword [ecx + 0x3c]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x14]
push ecx
call eax
mov esi, dword [ebp + 8]
add esp, 8
jmp 0x10059ad4
mov ecx, dword [ecx + 0x3c]
cmp dword [ecx], 0
je 0x10059abc
mov edx, dword [ecx]
mov eax, dword [edx + 0x28]
push 0
push 8
push ecx
call eax
add esp, 0xc
cmp eax, 0xc
jne 0x10059abc
xor eax, eax
mov esi, dword [ebp + 8]
jmp 0x10059ad4
mov eax, dword [esp + 0x28]
push 0
push 0
mov dword [eax + 0x18], edi
call fcn.1004c390
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x100598d0
mov edi, dword [esi + 4]
cmp byte [edi + 8], al
je 0x10059bac
call fcn.1004f810
cmp byte [edi + 8], 2
jne 0x10059b81
mov eax, dword [edi + 4]
mov ebx, dword [eax]
mov ecx, dword [ebx + 0x28]
mov dword [esp + 0x2c], eax
test ecx, ecx
je 0x10059b10
mov ebx, ecx
jmp 0x10059be6
cmp byte [ebx + 0xf], 2
jne 0x10059bb6
cmp byte [ebx + 4], 0
je 0x10059bb6
cmp byte [ebx + 5], 1
jne 0x10059bb6
mov byte [ebx + 0xf], 1
mov ecx, dword [eax + 0x3c]
mov byte [eax + 0x14], 1
mov dword [esp + 0x30], ecx
test ecx, ecx
je 0x10059b7a
cmp dword [ecx + 8], 0
je 0x10059b69
mov ebx, ecx
add ebx, 0xc
mov dword [esp + 0x34], 0x7d
mov eax, dword [ebx]
push eax
call fcn.10046730
add esp, 4
add ebx, 4
sub dword [esp + 0x34], 1
jne 0x10059b54
mov ecx, dword [esp + 0x30]
push ecx
call fcn.1003fb70
mov eax, dword [esp + 0x30]
add esp, 4
mov dword [eax + 0x3c], 0
mov eax, edi
call fcn.10052f30
cmp byte [edi + 9], 0
je 0x10059bac
add dword [edi + 0xc], 0xffffffff
jne 0x10059bac
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x10059ba8
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
mov ebx, 0x65
jmp 0x100598d0
movzx ecx, byte [ebx + 0x12]
push 1
push ecx
mov eax, ebx
call fcn.10048fe0
mov ecx, eax
and ecx, 0xff
add esp, 8
cmp ecx, 0xd
je 0x10059bd9
cmp ecx, 0xa
jne 0x10059be0
mov dword [ebx + 0x28], eax
mov byte [ebx + 0xf], 6
mov ebx, eax
mov eax, dword [esp + 0x2c]
test ebx, ebx
je 0x10059b32
cmp byte [edi + 9], 0
je 0x100598d0
add dword [edi + 0xc], 0xffffffff
jne 0x100598d0
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x10059c16
push eax
call dword [0x1011f238]
add esp, 4
mov byte [edi + 0xa], 0
jmp 0x100598d0
movzx edx, byte [edi + 0x12]
push 1
push edx
mov eax, edi
call fcn.10048fe0
mov ecx, eax
and ecx, 0xff
add esp, 8
cmp ecx, 0xd
je 0x10059c42
cmp ecx, 0xa
jne 0x10059c49
mov dword [edi + 0x28], eax
mov byte [edi + 0xf], 6
mov ecx, dword [esp + 0x34]
test eax, eax
je 0x10059943
mov eax, dword [esp + 0x10]
cmp byte [eax + 9], 0
je 0x100599bf
add dword [eax + 0xc], 0xffffffff
jne 0x100599bf
mov ecx, eax
mov edx, dword [ecx + 4]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x10059c83
push eax
call dword [0x1011f238]
add esp, 4
mov eax, dword [esp + 0x10]
mov byte [eax + 0xa], 0
jmp 0x100599bf