Function at 0x58cee0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
xor ebx, ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x58d0f3
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0xffffffff
jle 0x58d0ac
mov eax, dword [ebp - 4]
call fcn.0058f708
cmp eax, dword [ebp - 8]
jle 0x58d0ac
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x120]
mov edx, dword [ebp - 8]
call fcn.0056fcf0
mov edx, dword [0x570d6c]
call fcn.0040522c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
call fcn.005749bc
test al, al
je 0x58d0a2
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x58cf75
mov eax, dword [ebp - 0x24]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x58d092
xor eax, eax
push ebp
push 0x58d08b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0058e130
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
call fcn.004445fc
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x10]
push dword [eax + 0x34]
push dword [eax + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
lea edx, [ebp - 0x52]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, 0x2e
mov ebx, dword [eax]
call dword [ebx + 0xc]
movzx eax, word [ebp - 0x36]
movzx edx, word [ebp - 0x34]
add eax, edx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0x18]
movzx eax, word [ebp - 0x32]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov edx, dword [ebp - 0x14]
call fcn.004074e0
mov eax, dword [ebp - 0xc]
call fcn.00407050
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
mov ecx, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x160]
mov al, byte [eax + 0x28]
mov byte [ebp - 0x15], al
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0058d5a4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x160]
mov dl, byte [ebp - 0x15]
mov byte [eax + 0x28], dl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58d0dd
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x138]
xor edx, edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x40]
test al, al
jne 0x58d08a
mov eax, dword [ebp - 4]
call fcn.0058e1dc
ret
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov edx, dword [edx + 0x50]
call fcn.00406ed8
jmp 0x58d0dd
mov eax, dword [ebp - 0xc]
call fcn.00406a80
jmp 0x58d0dd
mov eax, dword [ebp - 8]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 0x58], 0
lea eax, [ebp - 0x5c]
push eax
push 0
lea edx, [ebp - 0x60]
mov eax, 0xb3
call fcn.0041e6b8
mov ecx, dword [ebp - 0x60]
mov dl, 1
mov eax, dword [0x4345e0]
call fcn.004238c8
call fcn.00406160
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58d0fa
lea eax, [ebp - 0x60]
call fcn.00406a5c
ret