Function at 0x401e70
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get common file path
Read file via mapping

Disassembly:
sub esp, 0x228
push ebx
push ebp
push esi
mov esi, dword [esp + 0x238]
xor ebx, ebx
push edi
cmp esi, ebx
mov byte [esp + 0x13], bl
je 0x4020d0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x135]
mov byte [esp + 0x134], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x134]
push 0x102
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x4020d0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00401e10
test eax, eax
push esi
je 0x401efb
lea ecx, [esp + 0x138]
lea edx, [esp + 0x34]
push ecx
push str._sSysWOW64_s
push 0x102
push edx
jmp 0x401f12
lea eax, [esp + 0x138]
lea ecx, [esp + 0x34]
push eax
push str._sSystem32_s
push 0x102
push ecx
call fcn.004020e0
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebp, eax
cmp ebp, ebx
je 0x4020d0
xor eax, eax
mov dword [esp + 0x1c], ebx
xor edx, edx
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], edx
push 0xc
mov dword [esp + 0x24], eax
push ecx
mov dword [esp + 0x2c], edx
push ebp
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.PSAPI.DLL_GetModuleInformation
test eax, eax
je 0x4020d0
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push ebx
push 3
push ebx
push 1
lea edx, [esp + 0x44]
push 0x80000000
push edx
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x401f89
cmp eax, ebx
jne 0x401fd7
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x30]
push 0x102
rep stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4020c0
push ebx
push ebx
push 3
push ebx
push 1
lea ecx, [esp + 0x44]
push 0x80000000
push ecx
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x4020d0
cmp eax, ebx
je 0x4020c0
mov edx, dword [esp + 0x14]
push ebx
push ebx
push ebx
push 0x1000002
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x2c], esi
je 0x4020c0
push ebx
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esp + 0x28], eax
je 0x4020b9
mov eax, dword [esp + 0x1c]
xor ebp, ebp
mov esi, dword [eax + 0x3c]
add esi, eax
cmp word [esi + 6], bx
jbe 0x4020b5
mov ebx, dword [sym.imp.MSVCRT.dll__strcmpi]
mov eax, ebp
xor ecx, ecx
mov cx, word [esi + 0x14]
and eax, 0xffff
mov edx, esi
push str..text
lea eax, [eax + eax*4]
add edx, ecx
lea edi, [edx + eax*8 + 0x18]
push edi
call ebx
add esp, 8
test eax, eax
je 0x40205c
inc ebp
cmp bp, word [esi + 6]
jb 0x40202c
jmp 0x4020b1
mov ebp, dword [edi + 0xc]
mov edx, dword [esp + 0x1c]
mov ebx, dword [edi + 8]
lea eax, [esp + 0x18]
push eax
add ebp, edx
push 0x40
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4020b1
mov esi, dword [edi + 0xc]
mov edx, dword [esp + 0x28]
mov ecx, ebx
add esi, edx
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
push ecx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4020b1
mov byte [esp + 0x13], 1
mov bl, byte [esp + 0x13]
mov esi, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x4020d0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x228
ret