Function at 0x40528b
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
or dword [esp - 0x1000], 0
or dword [esp - 0x112c], 0
sub esp, 0x12c
cmp dword [ebp + 8], 5
ja 0x405345
mov edi, dword [0x720fe4]
test edi, edi
jne 0x40546f
mov eax, dword fs:[0x30]
lea esi, [ebp - 0x118]
xor ebx, ebx
xor edi, edi
mov eax, dword [eax + 0xfe8]
mov dword [esp], str.SystemRoot
call dword [eax + 0x3fc]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._smoe_mapmoe_map.log
mov dword [esp + 4], 0x100
call fcn.00403175
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xfe8]
mov dword [esp], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
call dword [eax + 0x25c]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
jne 0x40534d
or eax, 0xffffffff
jmp 0x40560c
mov eax, dword fs:[0x30]
xor edx, edx
mov eax, dword [eax + 0xfe8]
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [eax + 0x2dc]
push ecx
push ecx
cmp eax, 0xa00000
je 0x4053b1
mov eax, dword fs:[0x30]
xor edi, edi
mov eax, dword [eax + 0xfe8]
mov dword [esp + 0xc], edi
mov dword [esp + 8], edi
mov dword [esp + 4], 0xa00000
mov dword [esp], esi
call dword [eax + 0x374]
mov eax, dword fs:[0x30]
sub esp, 0x10
mov eax, dword [eax + 0xfe8]
mov dword [esp], esi
call dword [eax + 0x368]
push eax
mov eax, dword fs:[0x30]
xor edx, edx
xor ecx, ecx
mov eax, dword [eax + 0xfe8]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 8], 4
call dword [eax + 0x260]
mov ebx, eax
mov eax, dword fs:[0x30]
sub esp, 0x18
mov eax, dword [eax + 0xfe8]
mov dword [esp], esi
call dword [eax + 0x248]
push esi
test ebx, ebx
je 0x405345
mov eax, dword fs:[0x30]
xor esi, esi
mov eax, dword [eax + 0xfe8]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], esi
mov dword [esp + 8], esi
mov dword [esp + 4], 0xf001f
mov dword [esp], ebx
call dword [eax + 0x328]
mov edi, eax
mov eax, dword fs:[0x30]
sub esp, 0x14
mov eax, dword [eax + 0xfe8]
mov dword [esp], ebx
call dword [eax + 0x248]
push eax
test edi, edi
je 0x405345
cmp dword [edi], 0x12345678
je 0x405469
xor ebx, ebx
mov dword [edi], 0x12345678
mov dword [edi + 8], ebx
mov dword [edi + 4], ebx
mov dword [0x720fe4], edi
mov eax, dword [0x7ffe0014]
mov edx, dword [0x7ffe0018]
mov dword [esp + 8], 0x2710
add eax, 0x2ac18000
adc edx, 0xfe624e21
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
call fcn.0040bdb7
add eax, 0x3e8
adc edx, 0
mov ebx, eax
mov esi, edx
cmp dword [edi + 4], 0
je 0x405503
mov eax, dword [0x7ffe0014]
mov edx, dword [0x7ffe0018]
mov dword [esp + 8], 0x2710
add eax, 0x2ac18000
adc edx, 0xfe624e21
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
call fcn.0040bdb7
cmp eax, ebx
sbb edx, esi
jae 0x405503
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xfe8]
mov dword [esp], 1
call dword [eax + 0x378]
push eax
jmp 0x4054ab
mov eax, dword [edi + 8]
mov dword [edi + 4], 1
add eax, 0x20
cmp eax, 0xa00000
jbe 0x40551c
xor eax, eax
mov dword [edi + 8], eax
mov eax, dword [edi + 8]
mov edx, dword [0x7ffe0018]
lea esi, [edi + eax + 0xc]
mov eax, dword [0x7ffe0014]
mov dword [esp + 8], 0x989680
lea ebx, [esi + 0xc]
add eax, 0x2ac18000
adc edx, 0xfe624e21
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
call fcn.0040bdb7
mov dword [esi], eax
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xfe8]
call dword [eax + 0x2b8]
and eax, 0xffffff
mov edx, eax
mov eax, dword [esi + 8]
and eax, 0xff000000
or eax, edx
mov dword [esi + 8], eax
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xfe8]
call dword [eax + 0x2c0]
mov dword [esi + 4], eax
mov al, byte [ebp + 8]
mov byte [esi + 0xb], al
mov edx, dword fs:[0x30]
lea eax, [ebp + 0x10]
mov edx, dword [edx + 0xfe8]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
lea eax, [edi + 0xa00000]
sub eax, ebx
mov dword [esp], 0x25
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], eax
call dword [edx + 0x4b8]
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xfe8]
mov dword [esp], ebx
sub ebx, esi
call dword [eax + 0x43c]
xor edx, edx
lea eax, [ebx + eax + 4]
and eax, 0xfffffffc
add dword [edi + 8], eax
mov eax, 1
lock cmpxchg dword [edi + 4], edx
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret