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

Disassembly:
sub esp, 0x20
xor eax, eax
cmp dword [esp + 0x68], 1
push ebx
setg al
push ebp
push esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0x40
mov dword [esp + 0x28], 6
push edi
mov dword [esp + 0x20], eax
lea ecx, [ecx]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
add eax, ecx
mov ecx, dword [esp + 0x38]
sar eax, 1
mov dword [esp + 0x18], eax
xor eax, eax
cmp dword [esp + 0x3c], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jle 0x59256d
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
lea ecx, [edx + eax*4]
sub edi, edx
sub ebp, edx
sub ebx, edx
sub eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
jmp 0x592520
mov eax, dword [edi + ecx - 4]
imul eax, dword [esp + 0x18]
sub ecx, 4
sar eax, 6
add eax, dword [ecx]
cmp eax, dword [ecx + ebp]
jge 0x592551
cmp dword [esp + 0x14], 0
jne 0x592551
mov esi, dword [esp + 0x78]
add esi, esi
add esi, esi
add esi, esi
cmp eax, esi
jl 0x592566
add dword [esp + 0x10], esi
jmp 0x592566
mov esi, dword [ebx + ecx]
cmp eax, esi
mov dword [esp + 0x14], 1
jl 0x592562
mov eax, esi
add dword [esp + 0x10], eax
sub dword [esp + 0x24], 1
jne 0x592520
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x10], eax
jle 0x592581
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
jmp 0x592589
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
sub dword [esp + 0x2c], 1
jne 0x5924d0
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp dword [esp + 0x3c], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jle 0x59263a
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x6c]
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
sub eax, edx
sub ebx, edx
lea ecx, [edx + esi*4]
sub edi, edx
sub ebp, edx
sub esi, dword [esp + 0x38]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
jmp 0x5925e0
mov eax, dword [ecx + edi - 4]
imul eax, dword [esp + 0x1c]
sub ecx, 4
sar eax, 6
add eax, dword [ecx]
cmp eax, dword [ecx + ebp]
jge 0x592619
cmp dword [esp + 0x14], 0
jne 0x592619
mov edx, dword [esp + 0x78]
add edx, edx
add edx, edx
xor ebx, ebx
add edx, edx
cmp eax, edx
setl bl
dec ebx
and ebx, edx
mov eax, ebx
mov ebx, dword [esp + 0x2c]
jmp 0x592621
mov dword [esp + 0x14], 1
mov edx, dword [esp + 0x28]
mov edx, dword [ecx + edx]
cmp eax, edx
jl 0x59262e
mov eax, edx
add dword [esp + 0x10], eax
sub esi, 1
mov dword [ebx + ecx], eax
jne 0x5925e0
mov ebp, dword [esp + 0x3c]
lea edi, [ebp - 1]
cmp edi, dword [esp + 0x40]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], edi
jle 0x5927e6
mov eax, dword [esp + 0x78]
lea ecx, [eax*8]
mov edx, ebp
lea eax, [edx*4 - 4]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
nop
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x20]
mov edx, dword [esp + 0x38]
movsx esi, word [eax + edx*2]
movsx ebx, word [eax + ebp*2]
mov ecx, dword [esp + 0x50]
sub ecx, dword [esp + 0x10]
sub ebx, esi
xor edx, edx
mov eax, ecx
div ebx
mov edx, dword [esp + 0x34]
mov edx, dword [edx + 0x20]
movsx edx, word [edx + edi*2]
sub esi, edx
imul ebx, eax
sub ecx, ebx
add esi, ecx
test esi, esi
jle 0x5926c4
mov edx, dword [esp + 0x34]
mov edx, dword [edx + 0x20]
movsx esi, word [edx + edi*2]
mov ebx, dword [esp + 0x38]
movsx edx, word [edx + ebx*2]
sub edx, esi
add edx, ecx
jmp 0x5926c6
xor edx, edx
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + 0x20]
movsx esi, word [ecx + edi*2]
movsx ecx, word [ecx + ebp*2]
mov ebx, dword [esp + 0x6c]
sub ecx, esi
mov esi, ecx
imul esi, eax
add esi, edx
mov edx, dword [esp + 0x48]
mov eax, dword [edx + edi*4]
mov edx, dword [esp + 0x2c]
add esi, dword [ebx + edi*4]
add edx, 8
cmp eax, edx
jg 0x5926f9
mov eax, edx
cmp esi, eax
jl 0x59278a
cmp dword [esp + 0x84], 0
je 0x592768
xor eax, eax
cmp ebp, 0x11
jle 0x592720
cmp edi, dword [esp + 0x88]
setge al
lea eax, [eax + eax + 7]
mov edx, dword [esp + 0x38]
add edx, 2
cmp ebp, edx
jle 0x5927f4
imul eax, ecx
mov ecx, dword [esp + 0x7c]
shl eax, cl
add eax, eax
add eax, eax
add eax, eax
sar eax, 4
cmp esi, eax
jle 0x592752
cmp edi, dword [esp + 0x8c]
jle 0x5927f4
mov eax, dword [esp + 0x80]
push 1
push 0
push eax
call fcn.00587720
add esp, 0xc
jmp 0x592782
mov ecx, dword [esp + 0x80]
push 1
push ecx
call fcn.0058abd0
add esp, 8
test eax, eax
jne 0x59280e
add dword [esp + 0x10], 8
sub esi, 8
mov eax, dword [esp + 0x60]
mov edx, dword [ebx + edi*4]
add edx, eax
sub dword [esp + 0x10], edx
test eax, eax
jle 0x5927ac
mov eax, edi
sub eax, dword [esp + 0x38]
movzx eax, byte [eax + 0x6574dc]
mov dword [esp + 0x60], eax
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
cmp esi, eax
jl 0x5927c1
add dword [esp + 0x10], eax
mov dword [ebx + edi*4], eax
jmp 0x5927c8
mov dword [ebx + edi*4], 0
mov ebp, dword [esp + 0x24]
sub dword [esp + 0x28], 4
lea edi, [ebp - 1]
cmp edi, dword [esp + 0x40]
mov dword [esp + 0x24], edi
jg 0x592670
mov dword [esp + 0x14], ebp
mov ecx, dword [esp + 0x58]
add dword [esp + 0x50], ecx
mov ebx, dword [esp + 0x6c]
jmp 0x592812
mov edx, dword [esp + 0x80]
push 1
push 1
push edx
mov dword [esp + 0x20], ebp
call fcn.00587720
add esp, 0xc
jmp 0x592812
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x60], 0
mov edi, dword [esp + 0x38]
jle 0x592870
cmp dword [esp + 0x84], 0
je 0x592850
mov esi, dword [esp + 0x5c]
mov eax, dword [esi]
cmp eax, ebp
jl 0x592833
mov eax, ebp
mov edx, dword [esp + 0x80]
mov ecx, ebp
sub ecx, edi
inc ecx
mov dword [esi], eax
push ecx
sub eax, edi
push eax
push edx
call fcn.00587a20
add esp, 0xc
jmp 0x59287a
mov ecx, dword [esp + 0x80]
mov eax, ebp
sub eax, edi
inc eax
push eax
push ecx
call fcn.0058acd0
mov esi, dword [esp + 0x64]
add esp, 8
add eax, edi
mov dword [esi], eax
jmp 0x59287a
mov esi, dword [esp + 0x5c]
mov dword [esi], 0
cmp dword [esi], edi
jg 0x592888
mov esi, dword [esp + 0x50]
add esi, dword [esp + 0x68]
jmp 0x5928d8
cmp dword [esp + 0x68], 0
jle 0x5928d4
cmp dword [esp + 0x84], 0
push 1
je 0x5928b8
mov edx, dword [esp + 0x68]
mov eax, dword [edx]
mov ecx, dword [esp + 0x84]
push eax
push ecx
call fcn.00587720
mov esi, dword [esp + 0x5c]
add esp, 0xc
jmp 0x5928e2
mov edx, dword [esp + 0x84]
push edx
call fcn.0058abd0
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x58]
add esp, 8
mov dword [ecx], eax
jmp 0x5928e2
mov esi, dword [esp + 0x50]
mov edx, dword [esp + 0x64]
mov dword [edx], 0
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 0x20]
movsx edx, word [eax + edi*2]
movsx ecx, word [eax + ebp*2]
sub esi, dword [esp + 0x10]
sub ecx, edx
mov eax, esi
xor edx, edx
div ecx
imul ecx, eax
sub esi, ecx
cmp edi, ebp
mov ecx, edi
jge 0x592933
jmp 0x592910
mov edx, dword [esp + 0x34]
mov edx, dword [edx + 0x20]
movsx edi, word [edx + ecx*2 + 2]
lea edx, [edx + ecx*2]
movsx edx, word [edx]
sub edi, edx
imul edi, eax
add dword [ebx + ecx*4], edi
inc ecx
cmp ecx, ebp
jl 0x592910
mov edi, dword [esp + 0x38]
cmp edi, ebp
mov eax, edi
jge 0x592978
lea esp, [esp]
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x20]
lea ecx, [edx + eax*2]
movsx edx, word [ecx + 2]
movsx ecx, word [ecx]
sub edx, ecx
cmp esi, edx
jge 0x59295b
mov ecx, esi
jmp 0x59296e
mov edx, dword [esp + 0x34]
mov ecx, dword [edx + 0x20]
lea edx, [ecx + eax*2]
movsx ecx, word [edx + 2]
movsx edx, word [edx]
sub ecx, edx
add dword [ebx + eax*4], ecx
inc eax
sub esi, ecx
cmp eax, ebp
jl 0x592940
cmp edi, ebp
mov dword [esp + 0x60], 0
mov dword [esp + 0x50], edi
jge 0x592bba
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x6c]
lea edi, [eax + ecx*4]
mov ecx, dword [esp + 0x4c]
sub ecx, edx
mov dword [esp + 0x28], ecx
mov ecx, edx
sub ecx, eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x74]
sub ecx, eax
mov dword [esp + 0x40], ecx
jmp 0x5929c0
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x20]
mov ebx, dword [esp + 0x50]
movsx ecx, word [eax + ebx*2]
movsx edx, word [eax + ebx*2 + 2]
lea eax, [eax + ebx*2]
mov eax, dword [esp + 0x2c]
sub edx, ecx
mov ecx, dword [esp + 0x7c]
lea ebp, [eax + edi]
mov eax, dword [ebp]
add eax, dword [esp + 0x60]
shl edx, cl
cmp edx, 1
jle 0x592b1b
mov ecx, dword [esp + 0x28]
mov esi, eax
sub esi, dword [ecx + ebp]
xor ecx, ecx
test esi, esi
setle cl
dec ecx
and ecx, esi
sub eax, ecx
cmp dword [esp + 0x78], 2
mov dword [esp + 0x38], ecx
mov dword [esp + 0x68], eax
mov dword [ebp], eax
jne 0x592a3a
cmp edx, 2
jle 0x592a3a
mov eax, dword [esp + 0x64]
cmp dword [eax], 0
jne 0x592a3a
mov ecx, dword [esp + 0x5c]
cmp ebx, dword [ecx]
jge 0x592a3a
mov eax, 1
jmp 0x592a3c
xor eax, eax
mov esi, edx
imul esi, dword [esp + 0x78]
add esi, eax
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0x38]
mov eax, dword [esp + 0x50]
movsx eax, word [ecx + eax*2]
mov ecx, dword [esp + 0x7c]
add ecx, ecx
add ecx, ecx
add ecx, ecx
add eax, ecx
imul eax, esi
mov ecx, esi
imul ecx, ecx, 0x15
mov ebx, eax
sar ebx, 1
sub ebx, ecx
cmp edx, 2
jne 0x592a7f
lea edx, [esi*8]
sar edx, 2
add ebx, edx
mov ecx, dword [esp + 0x68]
mov edx, esi
add ecx, ebx
shl edx, 4
cmp ecx, edx
jge 0x592a93
sar eax, 2
jmp 0x592aa3
lea edx, [esi + esi*2]
add edx, edx
add edx, edx
add edx, edx
cmp ecx, edx
jge 0x592aa5
sar eax, 3
add ebx, eax
mov eax, dword [esp + 0x68]
lea ecx, [eax + esi*4]
xor edx, edx
lea eax, [ecx + ebx]
test eax, eax
setl dl
dec edx
and eax, edx
xor edx, edx
div esi
shr eax, 3
mov dword [edi], eax
imul eax, dword [esp + 0x78]
mov edx, dword [ebp]
mov ecx, edx
sar ecx, 3
cmp eax, ecx
jle 0x592ade
mov ecx, dword [esp + 0x20]
sar edx, cl
sar edx, 3
mov dword [edi], edx
mov eax, dword [edi]
cmp eax, 8
jl 0x592aea
mov eax, 8
mov dword [edi], eax
lea edx, [esi*8]
imul edx, eax
mov eax, dword [ebp]
add eax, ebx
xor ecx, ecx
cmp edx, eax
mov edx, dword [esp + 0x40]
setge cl
mov dword [edx + edi], ecx
mov eax, dword [edi]
imul eax, dword [esp + 0x78]
add eax, eax
add eax, eax
add eax, eax
sub dword [ebp], eax
jmp 0x592b4e
mov edx, dword [esp + 0x78]
add edx, edx
add edx, edx
add edx, edx
mov ecx, eax
sub ecx, edx
mov edx, 0
sets dl
dec edx
and ecx, edx
sub eax, ecx
mov dword [ebp], eax
mov eax, dword [esp + 0x40]
mov dword [edi], 0
mov dword [esp + 0x38], ecx
mov dword [eax + edi], 1
cmp dword [esp + 0x38], 0
jle 0x592b9c
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
mov esi, dword [edi]
add ecx, 3
mov edx, ebx
sar edx, cl
mov eax, 8
sub eax, esi
cmp edx, eax
jge 0x592b73
mov eax, edx
add esi, eax
imul eax, dword [esp + 0x78]
add eax, eax
add eax, eax
mov ecx, ebx
sub ecx, dword [esp + 0x60]
xor edx, edx
add eax, eax
cmp eax, ecx
mov ecx, dword [esp + 0x40]
setge dl
sub ebx, eax
mov dword [edi], esi
mov dword [esp + 0x38], ebx
mov dword [ecx + edi], edx
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x38]
inc eax
add edi, 4
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x60], edx
mov dword [esp + 0x50], eax
jl 0x5929c0
mov ebx, dword [esp + 0x50]
mov edi, dword [esp + 0x3c]
cmp ebx, edi
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x60]
mov dword [eax], ecx
jge 0x592c17
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
mov esi, dword [esp + 0x74]
mov ebp, dword [esp + 0x20]
sub edx, ecx
sub esi, ecx
lea eax, [ecx + ebx*4]
sub edi, ebx
lea esp, [esp]
mov ebx, dword [eax + edx]
mov ecx, ebp
sar ebx, cl
xor ecx, ecx
sar ebx, 3
mov dword [eax], ebx
mov dword [eax + edx], 0
cmp dword [eax], 1
setl cl
add eax, 4
sub edi, 1
mov dword [eax + esi - 4], ecx
jne 0x592bf0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret