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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, 1
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x88]
mov edx, dword [esi + 8]
shl edi, cl
cmp eax, 5
je 0x59ae33
add eax, 0xfffffffa
cmp eax, 1
mov eax, dword [esi + 0x28]
ja 0x59abf1
mov ecx, dword [esi + 4]
mov dword [esp + 0x3c], eax
lea eax, [edi - 1]
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], ecx
lea ebx, [eax + ecx]
add eax, edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x34], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x4c], ebx
mov ecx, dword [esi + 0x78]
mov ebx, 1
mov dword [esp + 0x1c], ebx
shl dword [esp + 0x1c], cl
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
sub eax, dword [esi + 0x10]
cmp eax, ecx
jbe 0x59a9e5
mov eax, dword [esp + 0x24]
sub eax, ecx
mov ecx, dword [esi + 0x10]
jmp 0x59a9ea
mov ecx, dword [esi + 0x10]
mov eax, ecx
cmp dword [esi + 0x14], 0
cmovne eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
cmp eax, edi
jbe 0x59aa05
sub eax, edi
mov dword [esp + 0x38], eax
jmp 0x59aa0d
mov dword [esp + 0x38], 0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x84]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x80]
mov dword [esp + 0x28], eax
lea eax, [edi - 1]
mov edi, dword [esi + 0x18]
mov dword [esp + 0x40], eax
mov eax, edx
mov edx, dword [esp + 0x20]
sub eax, edx
shl ebx, cl
mov ecx, 0x40
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], 3
mov dword [esp + 0x44], eax
cmp edi, eax
jae 0x59aaaa
mov eax, ecx
lea esi, [edi + edx]
sub eax, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov ebx, eax
push 0xcf1bbcdc
push 0xbf9b0000
push dword [esi + 4]
push dword [esi]
call fcn.005e0820
mov ecx, ebx
call fcn.005e2c20
mov ecx, dword [esp + 0x2c]
lea esi, [esi + 1]
mov ebx, dword [esp + 0x3c]
lea edx, [ecx + eax*4]
mov eax, dword [edx]
mov ecx, edi
and ecx, dword [esp + 0x40]
mov dword [ebx + ecx*4], eax
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x1c]
mov dword [edx], edi
inc edi
cmp edi, eax
jb 0x59aa60
mov ebx, dword [esp + 0x14]
mov esi, dword [ebp + 8]
mov dword [esi + 0x18], eax
mov esi, dword [ebp + 0xc]
push 0xcf1bbcdc
push 0xbf9b0000
push dword [esi + 4]
push dword [esi]
call fcn.005e0820
mov ecx, 0x40
sub ecx, dword [esp + 0x28]
call fcn.005e2c20
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
mov edi, dword [ecx + eax*4]
cmp edi, edx
sbb ecx, ecx
xor eax, eax
inc ecx
cmp eax, ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x59abe6
mov ecx, dword [ebp + 0x10]
cmp edi, dword [esp + 0x48]
jb 0x59ab27
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
add eax, edi
mov al, byte [eax + edx]
cmp al, byte [edx + esi]
jne 0x59abb2
mov edx, dword [esp + 0x20]
push ecx
mov ecx, esi
lea edx, [edx + edi]
call fcn.00577530
add esp, 4
mov ecx, eax
jmp 0x59ab92
mov eax, dword [esp + 0x30]
mov eax, dword [eax + edi]
cmp eax, dword [esi]
jne 0x59abb6
mov esi, dword [esp + 0x30]
mov eax, dword [ebp + 0xc]
add esi, 4
add eax, 4
add esi, edi
mov dword [esp + 0x2c], eax
mov edx, esi
sub eax, esi
add eax, dword [esp + 0x34]
cmp eax, dword [ebp + 0x10]
cmovb ecx, eax
push ecx
mov ecx, dword [esp + 0x30]
call fcn.00577530
mov ecx, eax
add esp, 4
mov dword [esp + 0x44], ecx
lea eax, [ecx + esi]
cmp eax, dword [esp + 0x34]
jne 0x59ab8c
push dword [ebp + 0x10]
add ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x50]
call fcn.00577530
mov ecx, dword [esp + 0x48]
add esp, 4
add ecx, eax
mov esi, dword [ebp + 0xc]
add ecx, 4
cmp ecx, dword [esp + 0x18]
jbe 0x59abb2
mov eax, dword [esp + 0x24]
mov edx, dword [ebp + 0x14]
sub eax, edi
add eax, 2
mov dword [esp + 0x18], ecx
mov dword [edx], eax
lea eax, [ecx + esi]
cmp eax, dword [ebp + 0x10]
je 0x59abe6
mov edx, dword [esp + 0x10]
cmp edi, dword [esp + 0x38]
jbe 0x59abe6
mov eax, dword [esp + 0x50]
dec ebx
mov ecx, dword [esp + 0x3c]
and eax, edi
mov edi, dword [ecx + eax*4]
cmp edi, edx
sbb edx, edx
xor eax, eax
inc edx
cmp eax, ebx
sbb ecx, ecx
neg ecx
test ecx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x10]
jne 0x59aaf5
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x24], eax
lea eax, [edi - 1]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], eax
lea ebx, [ecx + eax]
add ecx, edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x30], ecx
mov ecx, edx
sub ecx, eax
mov dword [esp + 0x44], ebx
mov ebx, 1
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi + 0x78]
mov eax, ebx
shl eax, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, ecx
sub eax, dword [esi + 0x10]
cmp eax, dword [esp + 0x3c]
jbe 0x59ac4d
mov eax, ecx
sub eax, dword [esp + 0x3c]
jmp 0x59ac50
mov eax, dword [esi + 0x10]
cmp dword [esi + 0x14], 0
cmovne eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
cmp ecx, edi
jbe 0x59ac6a
mov eax, ecx
sub eax, edi
mov dword [esp + 0x28], eax
jmp 0x59ac72
mov dword [esp + 0x28], 0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x84]
mov dword [esp + 0x38], eax
lea eax, [edi - 1]
mov edi, dword [esi + 0x18]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
sub edx, eax
shl ebx, cl
mov ecx, dword [esi + 0x80]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], 3
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x3c], edx
cmp edi, edx
jae 0x59acf9
mov ebx, 0x20
sub ebx, ecx
jmp 0x59acc0
imul eax, dword [edi + eax], 0x9e3779b1
mov ecx, ebx
mov esi, dword [esp + 0x24]
shr eax, cl
mov ecx, dword [esp + 0x38]
lea edx, [ecx + eax*4]
mov ecx, edi
and ecx, dword [esp + 0x50]
mov eax, dword [edx]
mov dword [esi + ecx*4], eax
mov eax, dword [esp + 0x18]
mov dword [edx], edi
inc edi
cmp edi, dword [esp + 0x3c]
jb 0x59acc0
mov ebx, dword [esp + 0x14]
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x18], edx
mov ecx, 0x20
mov esi, dword [ebp + 0xc]
sub ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x10]
imul eax, dword [esi], 0x9e3779b1
shr eax, cl
mov ecx, dword [esp + 0x38]
mov edi, dword [ecx + eax*4]
cmp edi, edx
sbb ecx, ecx
xor eax, eax
inc ecx
cmp eax, ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x59b09d
mov ecx, dword [ebp + 0x10]
cmp edi, dword [esp + 0x48]
jb 0x59ad65
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add eax, edi
mov al, byte [eax + edx]
cmp al, byte [edx + esi]
jne 0x59adf2
mov edx, dword [esp + 0x18]
push ecx
mov ecx, esi
lea edx, [edi + edx]
call fcn.00577530
add esp, 4
mov ecx, eax
jmp 0x59adce
mov eax, dword [esp + 0x34]
mov eax, dword [edi + eax]
cmp eax, dword [esi]
jne 0x59adf6
mov esi, dword [esp + 0x34]
mov eax, dword [ebp + 0xc]
add esi, 4
add eax, 4
add esi, edi
mov dword [esp + 0x3c], eax
mov edx, esi
sub eax, esi
add eax, dword [esp + 0x30]
cmp eax, dword [ebp + 0x10]
cmovb ecx, eax
push ecx
mov ecx, dword [esp + 0x40]
call fcn.00577530
add esp, 4
mov dword [esp + 0x50], eax
lea ecx, [eax + esi]
cmp ecx, dword [esp + 0x30]
jne 0x59adc8
mov ecx, dword [esp + 0x3c]
push dword [ebp + 0x10]
mov edx, dword [esp + 0x48]
add ecx, eax
call fcn.00577530
add esp, 4
add eax, dword [esp + 0x50]
mov esi, dword [ebp + 0xc]
lea ecx, [eax + 4]
cmp ecx, dword [esp + 0x1c]
jbe 0x59adf2
mov eax, dword [esp + 0x2c]
mov edx, dword [ebp + 0x14]
sub eax, edi
add eax, 2
mov dword [esp + 0x1c], ecx
mov dword [edx], eax
lea eax, [ecx + esi]
cmp eax, dword [ebp + 0x10]
je 0x59b09d
mov edx, dword [esp + 0x10]
cmp edi, dword [esp + 0x28]
jbe 0x59b09d
and edi, dword [esp + 0x40]
dec ebx
mov eax, dword [esp + 0x24]
mov edi, dword [eax + edi*4]
cmp edi, edx
sbb edx, edx
xor eax, eax
inc edx
cmp eax, ebx
sbb ecx, ecx
neg ecx
test ecx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x10]
jne 0x59ad33
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 4]
mov dword [esp + 0x40], eax
lea eax, [edi - 1]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], ecx
lea ebx, [eax + ecx]
add eax, edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x44], ebx
mov ecx, dword [esi + 0x78]
mov ebx, 1
mov dword [esp + 0x24], ebx
shl dword [esp + 0x24], cl
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x18], eax
sub eax, dword [esi + 0x10]
cmp eax, ecx
jbe 0x59ae91
mov eax, dword [esp + 0x18]
sub eax, ecx
mov ecx, dword [esi + 0x10]
jmp 0x59ae96
mov ecx, dword [esi + 0x10]
mov eax, ecx
cmp dword [esi + 0x14], 0
cmovne eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
cmp eax, edi
jbe 0x59aeb1
sub eax, edi
mov dword [esp + 0x28], eax
jmp 0x59aeb9
mov dword [esp + 0x28], 0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x84]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x80]
mov dword [esp + 0x38], eax
lea eax, [edi - 1]
mov edi, dword [esi + 0x18]
mov dword [esp + 0x50], eax
mov eax, edx
mov edx, dword [esp + 0x20]
sub eax, edx
shl ebx, cl
mov ecx, 0x40
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], 3
mov dword [esp + 0x4c], eax
cmp edi, eax
jae 0x59af5f
mov eax, ecx
lea esi, [edi + edx]
sub eax, dword [esp + 0x38]
mov dword [esp + 0x3c], eax
mov ebx, eax
lea esp, [esp]
push 0xcf1bbcdc
push 0xbb000000
push dword [esi + 4]
push dword [esi]
call fcn.005e0820
mov ecx, ebx
call fcn.005e2c20
mov ecx, dword [esp + 0x34]
lea esi, [esi + 1]
mov ebx, dword [esp + 0x40]
lea edx, [ecx + eax*4]
mov eax, dword [edx]
mov ecx, edi
and ecx, dword [esp + 0x50]
mov dword [ebx + ecx*4], eax
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x3c]
mov dword [edx], edi
inc edi
cmp edi, eax
jb 0x59af10
mov ebx, dword [esp + 0x14]
mov ecx, 0x40
mov esi, dword [ebp + 8]
sub ecx, dword [esp + 0x38]
mov dword [esi + 0x18], eax
mov esi, dword [ebp + 0xc]
push 0xcf1bbcdc
push 0xbb000000
mov dword [esp + 0x58], ecx
push dword [esi + 4]
push dword [esi]
call fcn.005e0820
mov ecx, dword [esp + 0x50]
call fcn.005e2c20
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov edi, dword [ecx + eax*4]
cmp edi, edx
sbb ecx, ecx
xor eax, eax
inc ecx
cmp eax, ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x59b09d
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx]
cmp edi, dword [esp + 0x48]
jb 0x59afe2
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
add eax, edi
mov al, byte [eax + edx]
cmp al, byte [edx + esi]
jne 0x59b06b
mov edx, dword [esp + 0x20]
push ecx
mov ecx, esi
lea edx, [edi + edx]
call fcn.00577530
add esp, 4
mov ecx, eax
jmp 0x59b04b
mov eax, dword [esp + 0x30]
mov eax, dword [edi + eax]
cmp eax, dword [esi]
jne 0x59b06f
mov esi, dword [esp + 0x30]
mov eax, dword [ebp + 0xc]
add esi, 4
add eax, 4
add esi, edi
mov dword [esp + 0x3c], eax
mov edx, esi
sub eax, esi
add eax, dword [esp + 0x2c]
cmp eax, dword [ebp + 0x10]
cmovb ecx, eax
push ecx
mov ecx, dword [esp + 0x40]
call fcn.00577530
add esp, 4
mov dword [esp + 0x50], eax
lea ecx, [eax + esi]
cmp ecx, dword [esp + 0x2c]
jne 0x59b045
mov ecx, dword [esp + 0x3c]
push dword [ebp + 0x10]
mov edx, dword [esp + 0x48]
add ecx, eax
call fcn.00577530
add esp, 4
add eax, dword [esp + 0x50]
mov esi, dword [ebp + 0xc]
lea ecx, [eax + 4]
cmp ecx, dword [esp + 0x1c]
jbe 0x59b06b
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
sub eax, edi
add eax, 2
mov dword [esp + 0x1c], ecx
mov dword [edx], eax
lea eax, [ecx + esi]
cmp eax, dword [ebp + 0x10]
je 0x59b09d
mov edx, dword [esp + 0x10]
cmp edi, dword [esp + 0x28]
jbe 0x59b09d
and edi, dword [esp + 0x54]
dec ebx
mov eax, dword [esp + 0x40]
mov edi, dword [eax + edi*4]
cmp edi, edx
sbb edx, edx
xor eax, eax
inc edx
cmp eax, ebx
sbb ecx, ecx
neg ecx
test ecx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x10]
jne 0x59afb0
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret