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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5fa069
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x6b9a04]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
push esi
push edi
mov eax, dword [0x6b9a04]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
push edi
mov ebx, ecx
push 0x65c7d8
push ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ebx
call fcn.00406ca8
mov esi, eax
push ebx
lea ecx, [esp + 0x54]
mov dword [esp + 0x24], esi
call fcn.004051ae
mov ebx, 0x641040
push ebx
lea ecx, [esp + 0x8c]
mov dword [esp + 0xd4], edi
call fcn.0040518c
push ebx
lea ecx, [esp + 0x70]
mov byte [esp + 0xd4], 1
call fcn.0040518c
mov byte [esp + 0xd0], 2
mov dword [esp + 0x30], edi
cmp esi, 0xffffffff
je 0x586ade
push 0xffffffffffffffff
add esi, 2
push esi
push dword [esp + 0x24]
lea esi, [esp + 0xb0]
call fcn.00406cc7
mov byte [esp + 0xd0], 3
push dword [esp + 0x20]
lea esi, [esp + 0x38]
push edi
push dword [esp + 0x24]
call fcn.00406cc7
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0xdc], 4
call fcn.0040529a
push edi
push 1
mov ecx, esi
mov byte [esp + 0xd8], 3
call fcn.004055c2
mov esi, 0x6417bc
push esi
call fcn.005c3140
pop ecx
push eax
push esi
lea eax, [esp + 0xac]
push eax
xor eax, eax
call fcn.00406e21
push eax
mov dword [esp + 0x24], eax
push edi
lea eax, [esp + 0xac]
push eax
lea esi, [esp + 0x40]
call fcn.00406cc7
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x94]
mov byte [esp + 0xdc], 5
call fcn.0040529a
push edi
push 1
mov ecx, esi
mov byte [esp + 0xd8], 3
call fcn.004055c2
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
inc eax
push eax
lea eax, [esp + 0xac]
push eax
lea esi, [esp + 0x40]
call fcn.00406cc7
push 0xffffffffffffffff
push edi
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0xdc], 6
call fcn.0040529a
push edi
push 1
mov ecx, esi
mov byte [esp + 0xd8], 3
call fcn.004055c2
push 0x642ab4
lea ecx, [esp + 0x8c]
call fcn.00404ae8
test eax, eax
jne 0x586ac7
cmp dword [esp + 0x84], 0x10
mov eax, dword [esp + 0x70]
jae 0x586aa5
lea eax, [esp + 0x70]
push eax
call fcn.005c59d8
pop ecx
push ebx
lea ecx, [esp + 0x8c]
mov dword [esp + 0x34], eax
call fcn.0040556d
push ebx
lea ecx, [esp + 0x70]
call fcn.0040556d
push edi
push 1
lea ecx, [esp + 0xac]
mov byte [esp + 0xd8], 2
call fcn.004055c2
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x50]
add edi, 0x5c
push eax
lea ebx, [esp + 0x24]
mov dword [esp + 0x20], edi
call fcn.0041352d
cmp dword [esp + 0x20], 0
mov esi, dword [edi + 0x18]
mov eax, dword [edi]
je 0x586b09
cmp dword [esp + 0x20], eax
je 0x586b0e
call fcn.005c4332
mov eax, dword [esp + 0x24]
cmp eax, esi
je 0x586b2d
add eax, 0xc
push eax
lea ecx, [esp + 0x54]
call fcn.00404b75
test eax, eax
jl 0x586b2d
lea eax, [esp + 0x20]
jmp 0x586b3e
mov eax, dword [edi + 0x18]
mov dword [esp + 0x2c], eax
mov eax, dword [edi]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov ebx, dword [edi + 0x18]
mov eax, dword [edi]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], esi
test ecx, ecx
je 0x586b58
cmp ecx, eax
je 0x586b5d
call fcn.005c4332
cmp esi, ebx
jne 0x586bb3
push 0
push 1
lea ecx, [esp + 0x74]
call fcn.004055c2
push 0
push 1
lea ecx, [esp + 0x90]
call fcn.004055c2
push 0
push 1
lea ecx, [esp + 0x58]
call fcn.004055c2
xor eax, eax
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.005c30b2
mov esp, ebp
pop ebp
ret 4
mov esi, dword [esp + 0x30]
test esi, esi
jle 0x586c0f
lea eax, [esp + 0x50]
push eax
push edi
call fcn.00587f3c
cmp eax, esi
jg 0x586bf9
xor esi, esi
xor edi, edi
push edi
push 1
lea ecx, [esp + 0x74]
call fcn.004055c2
push edi
push 1
lea ecx, [esp + 0x90]
call fcn.004055c2
push edi
push 1
lea ecx, [esp + 0x58]
call fcn.004055c2
mov eax, esi
jmp 0x586b8d
test esi, esi
jle 0x586c0f
mov edi, esi
lea esi, [esp + 0x14]
call fcn.00416c5c
dec edi
jne 0x586bff
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x9c], 0
jne 0x586c27
lea esi, [esp + 0x14]
call fcn.005469a8
mov esi, dword [eax + 0x1c]
jmp 0x586bcc
lea eax, [esp + 0x50]
push eax
lea ebx, [esp + 0x2c]
call fcn.0041352d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x586ca9
lea esi, [esp + 0x14]
call fcn.005469a8
mov esi, dword [eax + 0x1c]
lea eax, [esp + 0x88]
push eax
lea ebx, [esp + 0x38]
mov eax, esi
call fcn.005881d1
lea ecx, [esp + 0x6c]
push ecx
mov ecx, eax
mov byte [esp + 0xd4], 7
call fcn.00404b75
mov ebx, eax
neg ebx
push 0
sbb bl, bl
push 1
lea ecx, [esp + 0x3c]
inc bl
mov byte [esp + 0xd8], 2
call fcn.004055c2
test bl, bl
jne 0x586bcc
lea esi, [esp + 0x14]
call fcn.00416c5c
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x50]
push eax
lea ebx, [esp + 0x2c]
call fcn.00587f8c
mov edi, eax
lea esi, [esp + 0x14]
call fcn.00584150
test al, al
je 0x586c44
jmp 0x586bca