Function at 0x10058129
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10142672
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov ebx, dword [eax + 0x18]
xor eax, eax
mov dword [esp + 0x10], eax
or eax, 0xffffffff
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, dword [ecx]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 4]
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], ebx
push eax
call fcn.100575ee
and dword [esp + 0x5c], 0
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x1005833f
and dword [esp + 0x28], esi
mov dword [esp + 0x24], 0x1000cfc0
test ebx, ebx
je 0x100582a4
mov eax, dword [edi]
lea ecx, [esp + 0x40]
push dword [eax + 0x44]
push dword [eax + 0x40]
call fcn.100595f3
push dword [esp + 0x3c]
lea ecx, [esp + 0x54]
push dword [esp + 0x3c]
call fcn.100595f3
add esp, 0x10
mov dword [esp + 0x20], 0x10
lea eax, [esp + 0x40]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x1c]
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax + 8]
mov dword [esp + 0x10], eax
test eax, eax
je 0x1005820f
mov edx, dword [ebx]
mov ecx, ebx
push eax
call dword [edx + 0x10]
mov edi, eax
jmp 0x10058307
mov edx, dword [edi]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x34]
push eax
push dword [ebp + 0xc]
mov edx, dword [edx + 0x38]
lea ecx, [esp + 0x20]
call fcn.10057769
add esp, 0xc
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 1
call fcn.1004f282
mov byte [esp + 0x5c], 0
push dword [esp + 0x14]
call fcn.10120f6a
mov esi, dword [esp + 0x10]
pop ecx
test esi, esi
jne 0x1005833f
push 0x10
call fcn.101206e6
pop ecx
test eax, eax
je 0x10058273
lea ecx, [esp + 0x24]
push ecx
mov ecx, eax
call fcn.10056959
mov edi, eax
jmp 0x10058275
xor edi, edi
cmp byte [esp + 0x2c], 0
je 0x10058307
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 0
je 0x10058307
mov eax, dword [ebx]
lea ecx, [esp + 0x1c]
push 0x100580c5
push dword [edi + 4]
push edi
push ecx
mov ecx, ebx
call dword [eax + 4]
mov dword [esp + 0x10], eax
jmp 0x10058307
mov edx, dword [edi]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x34]
push eax
push dword [ebp + 0xc]
mov edx, dword [edx + 0x38]
lea ecx, [esp + 0x20]
call fcn.10057769
add esp, 0xc
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 2
call fcn.1004f282
mov byte [esp + 0x5c], 0
push dword [esp + 0x14]
call fcn.10120f6a
mov esi, dword [esp + 0x10]
pop ecx
test esi, esi
jne 0x1005833f
push 0x10
call fcn.101206e6
pop ecx
test eax, eax
je 0x10058305
lea ecx, [esp + 0x24]
push ecx
mov ecx, eax
call fcn.10056959
jmp 0x10058208
xor edi, edi
test edi, edi
je 0x1005833f
mov eax, dword [ebp + 8]
mov ecx, edi
mov eax, dword [eax]
push dword [eax]
call fcn.10056de8
mov ebx, eax
mov eax, dword [esp + 0x10]
mov ecx, ebx
test eax, eax
jne 0x1005832e
push eax
push edi
push 0x100580a8
jmp 0x10058338
push eax
push dword [esp + 0x1c]
push 0x100580e1
call fcn.100579bd
jmp 0x1005834a
lea ecx, [esp + 0xc]
call fcn.10057b00
mov ebx, eax
push esi
call fcn.10120f6a
pop ecx
mov ecx, dword [esp + 0x54]
mov eax, ebx
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret