Function at 0x40467a
Capabilities:
Accept command line arguments
Get process heap flags
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00404279
mov edi, eax
xor ebx, ebx
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x4049b0
push 0x20
push edi
call dword [0x40601c]
pop ecx
pop ecx
cmp eax, ebx
jne 0x4046be
push ebx
push edi
call dword [0x40601c]
pop ecx
pop ecx
cmp eax, ebx
jne 0x4046be
push 0x4011b8
jmp 0x4049a3
sub eax, edi
sar eax, 1
cmp eax, 2
jae 0x4046df
push 0x4011cc
or eax, 0xffffffff
mov esi, 0x406030
call fcn.0040508d
push edi
jmp 0x4049a8
lea esi, [eax + eax]
lea eax, [esi + 2]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, ebx
jne 0x404707
push 0x4011e0
jmp 0x4049a3
push esi
push dword [ebp - 0x10]
push edi
call dword [0x406010]
add esp, 0xc
push edi
push ebx
xor eax, eax
push 4
mov word [esi + edi], ax
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x404752
push 0x4011f4
or eax, 0xffffffff
mov esi, 0x406030
call fcn.0040508d
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
call fcn.00405031
jmp 0x4049b0
mov edi, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebx
push ebx
push ebx
push 4
push eax
call edi
mov esi, eax
mov dword [ebp - 0x10], esi
cmp esi, ebx
jne 0x404770
push 0x401208
jmp 0x404731
push 0x20
push esi
push dword [ebp + 8]
call dword [0x406010]
add esp, 0xc
call fcn.004041f8
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x4049b0
mov ecx, dword [esi + 0x20]
mov esi, dword [ebp + 8]
add esi, 0x18
push eax
mov eax, esi
mov dword [ebp - 8], ecx
call fcn.0040419e
pop ecx
test al, al
je 0x4049b0
push dword [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.0040419e
pop ecx
test al, al
je 0x4049b0
push ebx
push ebx
push ebx
push 2
push dword [esi]
call edi
mov esi, eax
cmp esi, ebx
jne 0x4047d9
push 0x40121c
jmp 0x404731
cmp dword [esi + 0x50], ebx
je 0x40499e
cmp dword [esi + 0x54], ebx
je 0x40499e
mov eax, dword [esi + 0x40]
cmp eax, ebx
je 0x40499e
cmp dword [esi + 0x44], ebx
je 0x40499e
lea eax, [eax + eax + 2]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
jne 0x404822
push 0x401244
jmp 0x4049a3
mov eax, dword [esi + 0x40]
add eax, eax
push eax
mov eax, dword [esi + 0x44]
add eax, esi
push eax
push edi
call dword [0x406010]
mov eax, dword [esi + 0x40]
xor ecx, ecx
mov word [edi + eax*2], cx
mov eax, dword [esi + 0x50]
add esp, 0xc
lea eax, [eax + eax + 2]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x404868
push 0x401258
jmp 0x4049a3
mov ecx, dword [esi + 0x50]
add ecx, ecx
push ecx
mov ecx, dword [esi + 0x54]
add ecx, esi
push ecx
push eax
call dword [0x406010]
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x50]
add esp, 0xc
xor edx, edx
push eax
mov word [eax + ecx*2], dx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x406020]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
push edi
add eax, 0x38
push eax
call dword [0x406004]
push dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add eax, 0x40
push eax
call dword [0x406004]
call fcn.00403f5a
test al, al
je 0x404923
call fcn.004042e4
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], ebx
ja 0x404923
jb 0x4048e4
cmp ecx, 0x7fff0000
jae 0x404923
mov dword [ecx + 0x68], edi
mov dword [ecx + 0x6c], ebx
mov ax, word [esi + 0x40]
add ax, ax
mov word [ecx + 0x60], ax
mov ax, word [esi + 0x40]
inc ax
add ax, ax
mov word [ecx + 0x62], ax
mov eax, dword [ebp - 4]
mov dword [ecx + 0x78], eax
mov dword [ecx + 0x7c], ebx
mov ax, word [esi + 0x50]
add ax, ax
mov word [ecx + 0x70], ax
mov ax, word [esi + 0x50]
inc ax
add ax, ax
mov word [ecx + 0x72], ax
mov eax, dword [ebp - 0x10]
lea edi, [eax + 0x28]
mov eax, dword [eax + 0x24]
lea eax, [edi + eax*4]
mov dword [ebp - 0x14], eax
cmp edi, eax
je 0x40494f
mov eax, dword [edi]
push dword [ebp - 0xc]
add eax, esi
call fcn.0040419e
pop ecx
test al, al
je 0x4049b0
add edi, 4
cmp edi, dword [ebp - 0x14]
jne 0x404936
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x404966
push 0x40126c
jmp 0x404731
mov edi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call edi
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc]
call esi
push dword [ebp - 0x10]
call edi
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x4049b2
push 0x401230
mov esi, 0x406030
or eax, 0xffffffff
call fcn.0040508d
xor al, al
pop edi
pop esi
pop ebx
leave
ret