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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x24]
cmp eax, dword [ecx + 8]
jbe 0x5977dd
sub esp, 0xa4
mov eax, dword [esp + 0xc4]
mov ecx, dword [esp + 0xd0]
sub eax, ecx
mov ebx, dword [esp + 0xb0]
test ebx, ebx
jle 0x59773c
mov ebp, dword [esp + 0xbc]
test ebp, ebp
jle 0x59772e
lea esi, [ebx - 1]
cmp esi, ebx
jae 0x5977d6
mov esi, dword [esp + 0xa8]
lea edi, [esi + ebx*4 - 4]
lea edx, [ebp - 1]
cmp edx, ebp
jae 0x5977d6
mov edx, dword [esp + 0xb4]
lea edx, [edx + ebp*4 - 4]
cmp edx, edi
sete dl
test dl, dl
je 0x59765f
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x64], eax
lea esi, [eax + 1]
cmp esi, ebx
jg 0x59762e
ja 0x5977c1
mov dword [esp + 0x30], ebx
mov dword [esp + 0xa0], edx
mov dword [esp + 0x2c], esi
lea eax, [ecx + 1]
mov dword [esp], eax
call fcn.00596ce0
mov eax, dword [esp + 4]
mov dword [esp + 0x8c], eax
mov ecx, dword [eax]
mov dword [esp + 0x90], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x54], edx
mov ebx, dword [eax + 8]
mov ebp, dword [esp + 0xbc]
test ebp, ebp
jle 0x597612
mov esi, dword [esp + 0xc8]
test esi, esi
jle 0x5975fd
lea edi, [ebp - 1]
cmp edi, ebp
jae 0x5977ba
mov edi, dword [esp + 0xb4]
lea edx, [edi + ebp*4 - 4]
lea eax, [esi - 1]
cmp eax, esi
jae 0x5977ba
mov eax, dword [esp + 0xc0]
lea ecx, [eax + esi*4 - 4]
cmp ecx, edx
sete cl
mov dword [esp + 0x58], ebx
test cl, cl
je 0x59757f
xor ecx, ecx
xor edx, edx
mov ebp, dword [esp + 0xc4]
lea edi, [ebp + 1]
cmp edi, edx
jg 0x597555
ja 0x5977ac
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], edx
mov dword [esp + 0x9c], ecx
mov dword [esp], ecx
mov dword [esp + 4], edi
mov dword [esp + 8], edx
call fcn.00594000
mov eax, dword [esp + 0xd0]
lea ecx, [eax - 1]
cmp ecx, eax
jae 0x5977a5
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0xcc]
mov edx, dword [ecx + eax*4 - 4]
mov dword [esp], edx
call fcn.00585210
mov eax, dword [esp + 4]
mov dword [esp + 0x4c], eax
test eax, eax
ja 0x5974cc
mov ecx, dword [esp + 0xd0]
mov edx, dword [esp + 0xcc]
mov ebx, dword [esp + 0xd4]
xor ebp, ebp
mov esi, dword [esp + 0xc4]
mov edi, dword [esp + 0x34]
cmp esi, edi
ja 0x59779e
mov dword [esp + 0x74], ecx
mov dword [esp + 0x98], edx
mov dword [esp + 0xd4], ebx
mov dword [esp + 0x84], ebp
mov ecx, dword [esp + 0x9c]
mov dword [esp], ecx
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov edx, dword [esp + 0xc0]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], esi
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
call fcn.005a3b00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0x28]
cmp ecx, edx
jae 0x597797
mov ebx, dword [esp + 0x9c]
mov dword [ebx + ecx*4], eax
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jae 0x597790
mov eax, dword [esp + 0xd0]
mov ebp, dword [esp + 0x98]
mov esi, dword [ebp + eax*4 - 4]
mov dword [esp + 0x40], esi
mov edi, dword [esp + 0x64]
jmp 0x59724c
mov dword [esp + 0x70], eax
mov dword [esp + 0x50], edi
mov dword [esp], eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], ecx
call fcn.005a39e0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xd0]
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x9c]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0xd0]
mov esi, dword [esp + 0x60]
cmp eax, esi
jbe 0x5973a6
mov eax, 1
test al, al
je 0x597399
mov eax, dword [esp + 0x5c]
dec eax
mov ecx, dword [esp + 0x40]
lea edi, [ecx + esi]
cmp edi, esi
jae 0x59708f
mov ebp, dword [esp + 0x58]
cmp edx, ebp
ja 0x59776d
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x90]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov ebx, dword [esp + 0x98]
mov dword [esp + 0xc], ebx
mov esi, dword [esp + 0x74]
mov dword [esp + 0x10], esi
mov edi, dword [esp + 0xd4]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
call fcn.005a3ba0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xd0]
mov edx, dword [esp + 0x54]
cmp ecx, edx
jae 0x597766
mov ebx, dword [esp + 0x90]
mov dword [ebx + ecx*4], eax
mov eax, dword [esp + 0x64]
lea ebp, [eax + edx]
cmp eax, ebp
ja 0x59775f
mov esi, dword [esp + 0x34]
cmp ebp, esi
ja 0x59775f
sub esi, eax
mov edi, esi
xchg esi, ebx
neg ebx
xchg esi, ebx
shl eax, 2
sar esi, 0x1f
and esi, eax
mov eax, dword [esp + 0x9c]
add esi, eax
mov ebp, dword [esp + 0x64]
mov eax, dword [esp + 0x28]
cmp ebp, eax
ja 0x59775f
mov dword [esp + 0x6c], edi
mov dword [esp + 0x94], esi
mov dword [esp], esi
mov dword [esp + 4], edx
mov dword [esp + 8], edi
mov dword [esp + 0xc], esi
sub eax, ebp
mov dword [esp + 0x68], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x20], edx
call fcn.005a3a60
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x597318
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x2c]
cmp ecx, edx
jae 0x597751
mov ebx, dword [esp + 0xa0]
mov dword [ebx + ecx*4], eax
lea edi, [ecx - 1]
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x9c]
mov ebp, dword [esp + 0x98]
mov esi, dword [esp + 0x40]
test edi, edi
jl 0x5973c9
lea ecx, [eax + edi]
cmp ecx, edx
jae 0x597789
mov dword [esp + 0x64], edi
mov dword [esp + 0x78], ecx
mov ecx, dword [ebx + ecx*4]
cmp ecx, esi
je 0x5973b9
lea edi, [edi + eax - 1]
cmp edi, edx
jae 0x597782
mov eax, dword [ebx + edi*4]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], esi
call fcn.005a3a00
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xd0]
lea ebx, [edx - 2]
mov ebp, dword [esp + 0x74]
cmp ebx, ebp
jae 0x59777b
mov dword [esp + 0x5c], eax
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x98]
mov ebx, dword [ecx + edx*4 - 8]
mov dword [esp + 0x3c], ebx
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.005a39e0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xd0]
mov ebx, dword [esp + 0x64]
lea ebp, [ebx + edx - 2]
mov esi, dword [esp + 0x28]
cmp ebp, esi
jae 0x597774
mov edi, dword [esp + 0x9c]
mov ebp, dword [edi + ebp*4]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x7c]
jmp 0x5970e0
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x78]
cmp eax, ecx
ja 0x597758
mov eax, dword [esp + 0x94]
mov dword [esp], eax
mov ecx, dword [esp + 0xd0]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x6c]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x98]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x74]
mov dword [esp + 0x1c], edx
mov ebx, dword [esp + 0xd4]
mov dword [esp + 0x20], ebx
call fcn.005a3a20
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x9c]
mov ebx, dword [edx + ecx*4]
add eax, ebx
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x5c]
dec eax
jmp 0x59720e
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x5c]
jmp 0x597109
jne 0x5973b2
cmp ecx, ebp
seta al
jmp 0x5970f1
xor eax, eax
jmp 0x5970f1
mov ecx, esi
mov edx, eax
mov ebx, edi
mov eax, 0xffffffff
jmp 0x597109
mov eax, dword [esp + 0x84]
test eax, eax
jne 0x5974bf
mov eax, dword [esp + 0x8c]
mov dword [esp], eax
call fcn.00596de0
mov eax, dword [esp + 0xa0]
mov dword [esp], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
invalid
inc esp
invalid