Function at 0x406dd0
Capabilities:
Create process on windows
Get file size
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x413226
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x540
mov eax, dword [0x4ea33c]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [esp + 0x548], eax
mov dword [esp + 0x28], ecx
call fcn.004064f0
test eax, eax
je 0x4070ba
lea ebx, [eax + 0xc]
test ebx, ebx
je 0x4070ba
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
push 0x103
lea eax, [esp + 0x3c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x30]
call fcn.00403f20
mov edx, dword [0x4eae74]
mov ecx, 0x4eae74
mov dword [esp + 0x554], 0
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
push esi
lea eax, [esp + 0x24]
push 0x4e46c4
push eax
mov byte [esp + 0x560], 1
call fcn.00406d70
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push 0
push 0x8000000
push 4
push 0
push 1
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x28], eax
call edi
cmp eax, 0xb7
jne 0x406f3d
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x34]
lea edx, [esp + 0x14]
add esi, 0x34
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x406ee8
call fcn.00405b30
test eax, eax
jl 0x406ef0
mov eax, dword [esp + 0x10]
mov ecx, eax
mov eax, dword [esp + 0x14]
jmp 0x406ef8
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
sub ecx, 0x217
push 0
sbb eax, 0
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], eax
mov eax, dword [esi]
push ecx
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x406f24
call fcn.00405b30
push 0x217
lea ecx, [esp + 0x144]
push ecx
mov ecx, esi
call fcn.00405d70
jmp 0x40704c
call edi
test eax, eax
jne 0x40704c
mov edx, dword [ebx + 0x3c]
push esi
push edx
push eax
push 4
push eax
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ecx, dword [ebx + 0x3c]
push ecx
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov eax, dword [ebx + 0x3c]
xor esi, esi
test eax, eax
mov dword [esp + 0x10], esi
jbe 0x406ff9
mov edi, edi
sub eax, esi
cmp eax, 0x200000
mov dword [esp + 0x1c], 0x200000
ja 0x406f95
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x38]
push 0
add eax, esi
lea edx, [esp + 0x38]
push edx
push eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x34]
push ecx
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x406fc6
call fcn.00405b30
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [ecx + 0x34]
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406fea
call fcn.00405b30
mov eax, dword [esp + 0x10]
add esi, eax
add edi, eax
mov eax, dword [ebx + 0x3c]
cmp esi, eax
jb 0x406f80
mov eax, dword [edi - 0x217]
sub edi, 0x217
cmp eax, 0x6f636f51
mov dword [esp + 0x1c], edi
jne 0x407045
cmp dword [edi + 4], 0x126e695a
jne 0x407045
lea edx, [edi + 0xce]
xor eax, eax
mov ecx, 0x41
mov edi, edx
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x2c]
mov ecx, dword [esi - 0xc]
mov eax, ecx
shr ecx, 2
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
push 5
push 0
push 0
push esi
push str.Open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [esi - 0x10]
mov byte [esp + 0x554], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407091
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x554], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4070ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x54c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x544]
call fcn.0040b1f3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4