Function at 0x404634
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.00404233
mov edi, eax
xor ebx, ebx
mov dword [ebp - 0x10], edi
cmp edi, ebx
je 0x40496a
push 0x20
push edi
call dword [0x40601c]
pop ecx
pop ecx
cmp eax, ebx
jne 0x404678
push ebx
push edi
call dword [0x40601c]
pop ecx
pop ecx
cmp eax, ebx
jne 0x404678
push 0x4011b0
jmp 0x40495d
sub eax, edi
sar eax, 1
cmp eax, 2
jae 0x404699
push 0x4011c4
or eax, 0xffffffff
mov esi, 0x406030
call fcn.00405047
push edi
jmp 0x404962
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 0x4046c1
push 0x4011d8
jmp 0x40495d
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 0x40470c
push 0x4011ec
or eax, 0xffffffff
mov esi, 0x406030
call fcn.00405047
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
call fcn.00404feb
jmp 0x40496a
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 0x40472a
push 0x401200
jmp 0x4046eb
push 0x20
push esi
push dword [ebp + 8]
call dword [0x406010]
add esp, 0xc
call fcn.004041b2
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x40496a
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.00404158
pop ecx
test al, al
je 0x40496a
push dword [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.00404158
pop ecx
test al, al
je 0x40496a
push ebx
push ebx
push ebx
push 2
push dword [esi]
call edi
mov esi, eax
cmp esi, ebx
jne 0x404793
push 0x401214
jmp 0x4046eb
cmp dword [esi + 0x50], ebx
je 0x404958
cmp dword [esi + 0x54], ebx
je 0x404958
mov eax, dword [esi + 0x40]
cmp eax, ebx
je 0x404958
cmp dword [esi + 0x44], ebx
je 0x404958
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 0x4047dc
push 0x40123c
jmp 0x40495d
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 0x404822
push 0x401250
jmp 0x40495d
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 0x4048dd
call fcn.0040429e
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], ebx
ja 0x4048dd
jb 0x40489e
cmp ecx, 0x7fff0000
jae 0x4048dd
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 0x404909
mov eax, dword [edi]
push dword [ebp - 0xc]
add eax, esi
call fcn.00404158
pop ecx
test al, al
je 0x40496a
add edi, 4
cmp edi, dword [ebp - 0x14]
jne 0x4048f0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x404920
push 0x401264
jmp 0x4046eb
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 0x40496c
push 0x401228
mov esi, 0x406030
or eax, 0xffffffff
call fcn.00405047
xor al, al
pop edi
pop esi
pop ebx
leave
ret