Function at 0x4045cb
Capabilities:
Access pe header
Map section object

Disassembly:
push 0x3c4
push 0x4095d8
call fcn.00408200
xor ebx, ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x4c], ebx
mov word [ebp - 0xcc], bx
push 0x3a
push ebx
lea eax, [ebp - 0xca]
push eax
call sub.ntoskrnl.exe_memset
push 0xb
pop ecx
mov esi, str.SystemRootSystem32_
lea edi, [ebp - 0x3d4]
rep movsd dword es:[edi], dword [esi]
push 0x1dc
push ebx
lea eax, [ebp - 0x3a8]
push eax
call sub.ntoskrnl.exe_memset
add esp, 0x18
push 0x6d797467
push 0x1000
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x1cc]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004040e4
test eax, eax
jl 0x404939
lea eax, [ebp - 0x1cc]
push eax
call sub.ntoskrnl.exe_strlen
pop ecx
xor ecx, ecx
cmp eax, ebx
jl 0x40467b
movsx dx, byte [ebp + ecx - 0x1cc]
mov word [ebp + ecx*2 - 0xcc], dx
inc ecx
cmp ecx, eax
jle 0x404665
mov word [ebp + eax*2 - 0xcc], bx
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0x3d4]
push eax
call sub.ntoskrnl.exe_wcscat
pop ecx
pop ecx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x3d4]
push eax
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov dword [ebp - 0x90], 0x18
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x84], 0x40
lea eax, [ebp - 0x64]
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
push ebx
push ebx
push 0x20
push 1
push 1
push 0x80
push ebx
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x90]
push eax
push 0x100001
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwCreateFile]
test eax, eax
jl 0x40493d
push dword [ebp - 0x48]
push 0x8000000
push 2
push ebx
push ebx
push 4
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwCreateSection]
test eax, eax
jl 0x404939
push 2
push ebx
push 1
lea eax, [ebp - 0x4c]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
push 0xffffffffffffffff
push dword [ebp - 0x44]
call dword [sym.imp.ntoskrnl.exe_ZwMapViewOfSection]
cmp eax, ebx
jl 0x404939
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x1c]
push ecx
push 5
push ebx
push eax
call sub.ntoskrnl.exe_RtlImageDirectoryEntryToData
mov esi, eax
push dword [ebp - 0x3c]
call sub.ntoskrnl.exe_RtlImageNtHeader
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x70], eax
jmp 0x4048a1
mov edi, dword [esi + 4]
sub dword [ebp - 0x1c], edi
sub edi, 8
lea eax, [esi + 8]
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
je 0x40489e
mov eax, dword [ebp - 0x40]
movzx eax, word [eax]
mov ecx, eax
and cx, 0xf000
cmp cx, 0x3000
jne 0x404890
and eax, 0xfff
add eax, dword [ebp - 0x68]
mov dword [ebp - 0x50], eax
mov esi, dword [ebp - 0x58]
sub eax, esi
cmp eax, 4
jne 0x40488a
push esi
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
call fcn.0040452a
push esi
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
call fcn.00404565
cmp eax, ebx
je 0x40488a
cmp word [eax - 2], 0x5c7
jne 0x40488a
push 8
push eax
lea eax, [ebp - 0x34]
push eax
call sub.ntoskrnl.exe_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x70]
sub dword [ebp - 0x34], eax
sub dword [ebp - 0x30], eax
push dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
add eax, 4
push eax
call fcn.00404590
cmp eax, ebx
je 0x40488a
push 5
push 0x409450
push eax
call dword [sym.imp.ntoskrnl.exe_RtlCompareMemory]
cmp eax, 5
jne 0x40488a
mov eax, dword [ebp - 0x28]
jmp 0x404843
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0x30]
je 0x40484a
mov eax, dword [eax]
cmp eax, ebx
mov dword [ebp - 0x24], eax
jne 0x404836
cmp dword [ebp - 0x24], ebx
jne 0x404879
push 0x10
pop eax
call fcn.00408276
mov dword [ebp - 0x18], esp
mov eax, esp
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x28]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x34]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x30]
mov dword [eax + 8], ecx
add esi, 0xfffffffe
mov dword [eax + 0xc], esi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
cmp eax, dword [ebp - 0x34]
je 0x40488a
mov eax, dword [ebp - 0x24]
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
dec edi
dec edi
add dword [ebp - 0x40], 2
cmp edi, ebx
jne 0x404796
mov esi, dword [ebp - 0x40]
cmp dword [ebp - 0x1c], ebx
jne 0x40477c
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x40491e
cmp dword [eax + 4], ebx
je 0x404914
push dword [eax + 8]
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
call fcn.00404565
mov dword [ebp - 0x50], eax
mov eax, 0x80000003
mov esi, dword [ebp - 0x50]
mov dl, 4
mov edi, esi
inc esi
mov ecx, 8
repne scasd eax, dword es:[edi]
je 0x4048e1
dec dl
jne 0x4048d1
mov byte [ebp - 0x1d], dl
cmp byte [ebp - 0x1d], bl
je 0x404914
inc dword [ebp - 0x5c]
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
inc dword [ebp - 0x1c]
or dword [ebp - 4], 0xffffffff
jmp 0x404914
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
jmp 0x4048aa
cmp dword [ebp - 0x1c], 1
jne 0x404939
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
add eax, dword [ebp - 0x6c]
lea esp, [ebp - 0x3e0]
call fcn.0040823b
ret
xor eax, eax
jmp 0x40492d
mov dword [ebp - 0x54], 0xfff0bdc0
or dword [ebp - 0x50], 0xffffffff
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
call dword [sym.imp.ntoskrnl.exe_KeDelayExecutionThread]
jmp 0x4046d8