Function at 0x518688
Capabilities:
Access peb ldr_data
Create thread
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
mov ecx, 9
push 0
push 0
dec ecx
jne 0x518690
push ebx
push esi
mov ebx, dword [0x52a970]
xor eax, eax
push ebp
push 0x5188de
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x52a654]
cmp byte [eax], 0
jne 0x5187c8
lea edx, [ebp - 0xc]
mov eax, dword [0x52a9f0]
mov eax, dword [eax]
call fcn.0051a878
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 8]
mov edx, 0x5188f4
call fcn.00519ccc
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.00408b04
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x10]
call fcn.00409040
mov esi, eax
lea edx, [ebp - 0x1c]
mov eax, dword [ebx]
call fcn.00408b04
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x18]
call fcn.00409040
cmp esi, eax
jne 0x518766
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
call fcn.00408b04
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x20]
call fcn.00409040
cdq
push edx
push eax
mov eax, dword [0x52a8e8]
mov eax, dword [eax]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x518762
cmp eax, dword [esp]
pop edx
pop eax
je 0x5187c0
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 8]
mov eax, dword [eax]
call fcn.00408b04
mov eax, dword [ebp - 0x28]
mov edx, 0x51890c
call fcn.00404b04
je 0x5187c0
lea edx, [ebp - 0x2c]
mov eax, dword [0x52a9f4]
mov eax, dword [eax]
call fcn.0051a878
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x52a858]
call fcn.0040474c
mov eax, dword [0x52a858]
mov eax, dword [eax]
call fcn.00519318
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x51b1ac
push 0
push 0
call sub.KERNEL32.DLL_CreateThread
mov eax, dword [0x52a654]
mov byte [eax], 1
mov ecx, dword [ebx]
lea eax, [ebp - 0x30]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x30]
call fcn.00409040
mov dword [ebx + 4], eax
mov ecx, dword [ebx + 8]
lea eax, [ebp - 0x34]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x34]
call fcn.00409040
mov dword [ebx + 0xc], eax
mov ecx, dword [ebx + 0x10]
lea eax, [ebp - 0x38]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x38]
call fcn.00409040
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx + 0x18]
lea eax, [ebp - 0x3c]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x3c]
call fcn.00409040
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebx + 0x20]
lea eax, [ebp - 0x40]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x40]
call fcn.00409040
mov dword [ebx + 0x24], eax
mov ecx, dword [ebx + 0x28]
lea eax, [ebp - 0x44]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x44]
call fcn.00409040
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x30]
call fcn.00517670
mov dword [ebx + 0x34], eax
mov eax, dword [ebx + 0x38]
call fcn.00517670
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 0x40]
call fcn.00517670
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x48]
call fcn.00517670
mov dword [ebx + 0x4c], eax
mov ecx, dword [ebx + 0x50]
lea eax, [ebp - 0x48]
mov edx, 0x518900
call fcn.00404a04
mov eax, dword [ebp - 0x48]
call fcn.00409040
mov dword [ebx + 0x54], eax
call fcn.005174e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5188e5
lea eax, [ebp - 0x48]
mov edx, 0x10
call fcn.0040471c
lea eax, [ebp - 8]
mov edx, dword [0x4948a8]
call fcn.00405ab8
ret