Function at 0x421610
Capabilities:
Allocate or change rwx memory
Get common file path
Get file size
Parse pe header
Read file on windows
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a6118
push 0x52f148
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x20], ecx
xor eax, eax
mov word [ebp - 0x24c], ax
push 0x206
push eax
lea ecx, [ebp - 0x24a]
push ecx
call fcn.0052ea80
add esp, 0xc
push 0x104
lea edx, [ebp - 0x24c]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
lea edi, [ebp - 0x24c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x421675
mov ecx, 7
mov esi, str.Kernel32.dll
rep movsd dword es:[edi], dword [esi]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
push 0
cmp esi, 0xffffffff
jne 0x4216b8
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, eax
test edi, edi
jne 0x4216cc
push eax
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push edi
call fcn.0042cd90
add esp, 4
mov ebx, eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x30], 0
push 0
lea ecx, [ebp - 0x30]
push ecx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push esi
call sub.ntdll.dll_ZwClose
mov edx, 0x5a4d
cmp word [ebx], dx
je 0x421708
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
mov esi, dword [ebx + 0x3c]
add esi, ebx
mov dword [ebp - 0x24], esi
cmp dword [esi], 0x4550
je 0x421720
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push ebx
push esi
mov ecx, dword [ebp - 0x20]
call fcn.00420be0
mov eax, dword [esi + 0x78]
push eax
push esi
call fcn.00420b80
lea edi, [ebx + eax]
mov dword [ebp - 0x28], edi
mov ecx, dword [edi + 0x20]
push ecx
push esi
call fcn.00420b80
add eax, ebx
mov dword [ebp - 0x3c], eax
mov edx, dword [edi + 0x1c]
push edx
push esi
call fcn.00420b80
add eax, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x24]
push eax
push esi
call fcn.00420b80
add esp, 0x20
add eax, ebx
mov dword [ebp - 0x44], eax
push 0x56754c
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x1c], 0
jne 0x421786
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [edi + 0x14]
jae 0x42189f
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x1c]
cmp dword [edx], eax
jbe 0x42185f
mov dword [ebp - 0x38], eax
cmp eax, dword [edi + 0x18]
jae 0x42185f
mov edx, dword [ebp - 0x44]
movzx edx, word [edx + eax*2]
cmp ecx, edx
jne 0x421873
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx + eax*4]
push edx
push esi
call fcn.00420b80
lea edi, [ebx + eax]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
push ecx
push esi
call fcn.00420b80
lea esi, [ebx + eax]
push edi
mov edx, dword [ebp - 0x34]
push edx
call fcn.004209f0
mov edi, eax
push 0xa
push edi
push esi
call sub.ntdll.dll__memicmp
add esp, 0x24
test eax, eax
je 0x421859
cmp byte [edi], 0xe9
jne 0x421859
push 3
push 0x567548
push esi
call fcn.00534972
add esp, 0xc
test eax, eax
je 0x421859
push 5
push str.Ntdll
push esi
call fcn.00534972
add esp, 0xc
test eax, eax
je 0x421859
lea eax, [ebp - 0x2c]
push eax
push 0x40
push 5
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
mov ecx, dword [esi]
mov dword [edi], ecx
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
mov ax, word [esi + 8]
mov word [edi + 8], ax
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
push 5
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
add dword [ebp - 0x1c], 4
mov ecx, dword [ebp - 0x20]
inc ecx
jmp 0x421788
inc eax
jmp 0x4217a4
push ebx
call fcn.0042cd9b
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret