Function at 0x58697c
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
mov ebx, eax
xor eax, eax
push ebp
push 0x586c2f
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
cmp dword [ebx + 0x30], 0
jne 0x5869bd
mov ecx, 0x586c50
mov dl, 1
mov eax, dword [0x54e5ac]
call fcn.00425260
call fcn.00406448
cmp dl, 1
jne 0x586a2b
mov dl, 1
mov eax, dword [0x43aa18]
call fcn.00404fd4
mov esi, eax
lea eax, [ebp - 8]
mov edx, dword [ebx + 0x1c]
call fcn.00407178
lea eax, [ebx + 0x1c]
call fcn.00406d50
mov ecx, esi
mov edx, dword [ebp - 8]
mov eax, ebx
call fcn.00586860
lea eax, [ebx + 0x1c]
mov edx, dword [ebp - 8]
call fcn.00407130
mov edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.00586724
mov edx, dword [ebx + 0x30]
mov eax, esi
call fcn.005867f0
mov edx, esi
mov eax, ebx
call fcn.00586724
mov eax, esi
call fcn.00405004
mov byte [ebx + 0x34], 1
mov byte [ebp - 9], 1
jmp 0x586c0b
cmp byte [ebx + 0x34], 0
je 0x586c0b
mov dl, 1
mov eax, dword [0x576274]
call fcn.00572b70
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
add eax, 0xc
call fcn.00406d98
mov eax, dword [ebp - 0x10]
add eax, 0x14
mov edx, dword [ebx + 0x28]
mov edx, dword [edx + 0xc]
call fcn.00407d1c
mov eax, dword [ebp - 0x10]
add eax, 0x18
mov edx, dword [ebx + 0x28]
mov edx, dword [edx + 8]
call fcn.00407d1c
mov eax, dword [ebp - 0x10]
add eax, 0x1c
call fcn.00406d98
push 2
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x576240]
call fcn.00409124
add esp, 4
mov eax, dword [ebp - 4]
mov edx, 0x586c94
call fcn.004071a4
mov eax, dword [ebp - 4]
add eax, 4
mov edx, 0x586cac
call fcn.004071a4
mov eax, dword [ebp - 0x10]
add eax, 0x34
mov edx, dword [ebp - 4]
mov ecx, dword [0x576240]
call fcn.00409284
mov eax, dword [ebp - 0x10]
add eax, 0x10
call fcn.00406d98
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x20], edx
mov eax, dword [ebx + 0x20]
dec eax
je 0x586ae8
dec eax
je 0x586af1
jmp 0x586afa
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x24], 1
jmp 0x586b08
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x24], 2
jmp 0x586b08
mov dword [ebx + 0x20], 3
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x24], 0
mov eax, dword [ebp - 0x10]
add eax, 0x28
mov edx, dword [ebx + 0x1c]
call fcn.00407d1c
mov eax, dword [ebp - 0x10]
add eax, 0x2c
call fcn.00406d98
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x30], 0
mov eax, dword [ebp - 0x10]
mov byte [eax + 0x31], 1
xor eax, eax
push ebp
push 0x586c04
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0xc]
call fcn.0057accc
mov edx, dword [ebp - 0x10]
call fcn.005795c4
mov dword [ebp - 0x14], eax
mov edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.00586724
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x10], 0
je 0x586bce
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0xc]
mov eax, dword [ebx + 0xc]
call fcn.00587eec
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
call fcn.00408f70
mov edi, eax
dec edi
test edi, edi
jl 0x586bce
inc edi
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 0x18]
mov esi, dword [eax + edx*4]
cmp byte [esi + 0x18], 0
je 0x586bbe
mov eax, dword [ebx + 0x18]
push eax
mov ecx, dword [ebx + 0x14]
mov edx, dword [esi + 0x1c]
mov eax, ebx
call fcn.00586648
test al, al
je 0x586bc8
mov eax, dword [ebx + 0x30]
mov edx, esi
call fcn.00586784
jmp 0x586bc8
mov eax, dword [ebx + 0x30]
mov edx, esi
call fcn.00586784
inc dword [ebp - 0x18]
dec edi
jne 0x586b8b
mov byte [ebp - 9], 1
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax]
call dword [ecx]
mov byte [ebx + 0x34], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x586c0b
cmp dword [ebp - 0x14], 0
je 0x586bfb
mov eax, dword [ebp - 0x14]
call fcn.00405004
mov eax, dword [ebp - 0x10]
call fcn.00405004
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x586c36
lea eax, [ebp - 8]
call fcn.00406d50
lea eax, [ebp - 4]
mov edx, dword [0x576240]
call fcn.00409248
ret