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

Disassembly:
mov eax, 0x7dafc0
call fcn.007a83c4
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
call fcn.00421fa4
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov bl, al
mov dword [ebp - 0x28], ebx
call fcn.00421fa4
push dword [esi + 0x104]
mov byte [ebp - 0xd], al
lea eax, [esi + 0xfc]
push eax
call fcn.004129f5
cmp eax, 1
pop ecx
pop ecx
jne 0x585f97
xor edi, edi
cmp ebx, edi
jne 0x585f99
movzx eax, byte [ebp - 0xd]
shr eax, 1
cmp eax, 0xc
jl 0x5862bc
cmp eax, 0x14
jg 0x5862bc
jmp 0x585f99
xor edi, edi
call fcn.00717e1c
mov ebx, dword [esi + 0xe4]
mov dword [ebp - 0x14], eax
lea eax, [ebx - 0xc]
neg ebx
sbb ebx, ebx
and ebx, eax
mov ecx, esi
mov dword [ebp - 0x20], ebx
call fcn.0057ee23
test eax, eax
je 0x58600c
mov ecx, dword [esi + 0xe8]
push edi
push edi
push edi
lea eax, [ecx - 0xc]
push edi
neg ecx
push edi
sbb ecx, ecx
and ecx, eax
mov eax, dword [ecx]
push edi
push edi
call dword [eax + 4]
cmp dword [esi + 0x26c], edi
je 0x585feb
mov eax, dword [esi + 0x158]
cmp eax, edi
jne 0x585ff1
mov eax, dword [esi + 0x154]
push dword [eax + 0x3c]
add eax, 0x34
push eax
call fcn.004129f5
pop ecx
pop ecx
push ebx
push eax
lea ecx, [ebx + 0x184]
call fcn.00598126
mov ecx, dword [ebp + 8]
call fcn.00422013
cmp byte [ebp - 0xd], 0
mov dword [ebp - 0x18], eax
jl 0x586294
cmp dword [esi + 0x26c], edi
je 0x586033
mov eax, dword [esi + 0x158]
cmp eax, edi
jne 0x586039
mov eax, dword [esi + 0x154]
push dword [eax + 0x3c]
add eax, 0x34
push eax
call fcn.004129f5
pop ecx
pop ecx
push ebx
push eax
lea ecx, [ebx + 0x184]
call fcn.00598126
movzx eax, byte [ebp - 0xd]
push dword [esi + 0x320]
mov edi, eax
and eax, 1
mov dword [ebp - 0x1c], eax
lea eax, [esi + 0x318]
push eax
shr edi, 1
call fcn.004129f5
cmp eax, 0xc
pop ecx
pop ecx
jl 0x586080
cmp eax, 0x14
jle 0x58609e
push dword [esi + 0x320]
lea eax, [esi + 0x318]
push eax
call fcn.004129f5
cmp eax, 0x15
pop ecx
pop ecx
jl 0x5860a8
cmp eax, 0x19
jg 0x5860a8
cmp edi, 6
jl 0x5860a8
cmp edi, 8
jle 0x5860f1
lea edx, [esi + 0x318]
mov ecx, edi
call fcn.00412a43
push dword [esi + 0x314]
mov dword [esi + 0x320], eax
lea eax, [esi + 0x30c]
push eax
call fcn.004129f5
pop ecx
pop ecx
mov ecx, eax
xor ecx, dword [ebp - 0x1c]
lea edx, [esi + 0x30c]
and ecx, 1
xor ecx, eax
call fcn.00412a43
mov ecx, esi
mov dword [esi + 0x314], eax
call fcn.0057fef5
cmp edi, 0xc
jl 0x586122
cmp edi, 0x14
jg 0x586122
push dword [esi + 0x320]
lea eax, [esi + 0x318]
push eax
call fcn.004129f5
pop ecx
pop ecx
push dword [ebp - 0x18]
mov ecx, esi
push dword [ebp - 0x1c]
push eax
call fcn.00587215
jmp 0x586294
cmp edi, 6
jl 0x58614f
cmp edi, 8
jg 0x58614f
push edi
mov ecx, esi
call fcn.0058034d
add eax, dword [ebp - 0x14]
lea edx, [esi + 0x324]
mov ecx, eax
call fcn.00412a43
mov dword [esi + 0x32c], eax
jmp 0x586294
cmp edi, 0x15
jl 0x586294
cmp edi, 0x19
jg 0x586294
mov eax, dword [esi + 0x154]
push dword [eax + 0x14]
add eax, 0xc
push eax
call fcn.004a6b73
pop ecx
lea ebx, [esi + 4]
pop ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x10]
push dword [eax + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x10]
push dword [eax]
call fcn.00719c5c
push eax
dec edi
push edi
push dword [ebp - 0x24]
call fcn.0071a281
mov eax, dword [ebp - 0x18]
and dword [ebp - 0x14], 0
xor edx, edx
mov dl, al
sar eax, 8
add esp, 0x14
and dword [ebp - 0x18], 0
movzx edi, al
mov eax, dword [esi + 0x154]
mov ecx, dword [eax + 0x244]
test ecx, ecx
je 0x5861f0
mov ebx, dword [ebp - 0x14]
cmp ebx, dword [ecx - 4]
jae 0x5861f0
mov ebx, dword [ebp - 0x18]
cmp edx, dword [ebx + ecx + 0xc]
je 0x5861e0
inc dword [ebp - 0x14]
add dword [ebp - 0x18], 0x1c
jmp 0x5861bc
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x1c
add ecx, dword [eax + 0x244]
mov ebx, ecx
jmp 0x5861f2
xor ebx, ebx
mov ecx, dword [0x87e3dc]
push edx
call fcn.005fa293
test ebx, ebx
je 0x586291
test eax, eax
je 0x586291
test edi, edi
jle 0x586291
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x58621c
mov ecx, dword [ecx - 4]
cmp edi, ecx
ja 0x586291
mov eax, dword [eax + 4]
imul edi, edi, 0x54
lea edi, [edi + eax - 0x54]
lea eax, [ebp - 0x14]
push eax
mov ecx, edi
call fcn.005862cd
mov eax, dword [ebp - 0x14]
and dword [ebp - 4], 0
test eax, eax
je 0x58624d
mov eax, dword [eax]
test eax, eax
je 0x58624d
mov eax, dword [eax - 4]
shr eax, 1
jmp 0x58624f
xor eax, eax
test eax, eax
je 0x58627d
lea eax, [ebp - 0x14]
lea ecx, [esi + 0x7c]
push eax
call fcn.00402ee1
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x78], eax
call fcn.00717e1c
mov ecx, dword [ebx + 0x18]
add eax, ecx
test eax, eax
mov dword [esi + 0x74], eax
jne 0x58627d
mov dword [esi + 0x74], 1
mov ecx, dword [ebp - 0x14]
or dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x586291
call fcn.00403051
and dword [ebp - 0x14], 0
mov ebx, dword [ebp - 0x20]
push dword [ebp + 8]
lea ecx, [ebx + 0x184]
call fcn.0059831f
mov ecx, dword [ebp - 0x28]
neg ecx
sbb ecx, ecx
dec ecx
lea edx, [esi + 0xfc]
dec ecx
call fcn.00412a43
mov dword [esi + 0x104], eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4