Function at 0x4af4d0
Capabilities:
Create process on windows
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 0x7e4
mov eax, dword [0xa0b130]
xor eax, esp
mov dword [esp + 0x7e0], eax
mov eax, dword [esp + 0x7e8]
push ebx
mov ebx, dword [esp + 0x818]
push ebp
mov dword [esp + 0x18], eax
lea eax, [esp + 0x7f4]
push esi
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push edi
push eax
mov word [esp + 0x1c], 0x105
call fcn.0040b43d
add esp, 4
test al, al
jne 0x4af536
test ebx, ebx
je 0x4af52f
push 0x16
push str.program_not_executable
mov ecx, ebx
call fcn.00408698
xor al, al
jmp 0x4affd5
lea eax, [esp + 0xec]
mov dword [esp + 0xe4], 0
mov dword [esp + 0xe0], eax
lea eax, [esp + 0x7fc]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push 0
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0xf0], 0x40
push eax
mov word [esp + 0x24], 0x105
call fcn.0040a542
add esp, 0xc
cmp dword [eax], 0
je 0x4af5cc
lea eax, [esp + 0x7fc]
mov word [esp + 0x18], 0x305
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0xe0]
mov dword [esp + 0x14], str..exe
push eax
call fcn.0041291d
mov eax, dword [esp + 0xe0]
mov ecx, dword [esp + 0xe4]
mov dword [esp + 0x7fc], eax
mov dword [esp + 0x800], ecx
push dword [esp + 0x808]
lea eax, [esp + 0x9c]
push dword [esp + 0x808]
push eax
call fcn.00408e9f
xor edi, edi
xor ebp, ebp
add esp, 0xc
mov dword [esp + 0x10], ebp
cmp byte [esp + 0x814], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
je 0x4af799
mov esi, dword [esp + 0x80c]
mov eax, dword [esp + 0x810]
lea ebp, [esi + eax*8]
cmp esi, ebp
je 0x4af77f
lea eax, [esp + 0x1c0]
mov dword [esp + 0x1b8], 0
mov dword [esp + 0x1b4], eax
lea eax, [esp + 0x1b4]
push eax
push dword [esi + 4]
lea eax, [esp + 0x2c]
mov dword [esp + 0x1c4], 0x104
push dword [esi]
push eax
call fcn.00412350
mov eax, dword [esp + 0x34]
add esp, 0x10
test eax, eax
jne 0x4af6ce
mov ecx, dword [esp + 0x1b4]
mov eax, dword [esp + 0x1b8]
push dword [esp + 0x20]
lea eax, [ecx + eax*2]
push eax
push ecx
push edi
lea ecx, [esp + 0x20]
call fcn.0040d07b
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
lea ecx, [esp + 0x14]
call fcn.0040d594
mov eax, dword [esp + 0x1b4]
lea ecx, [esp + 0x1c0]
cmp eax, ecx
je 0x4af6ba
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
add esi, 8
cmp esi, ebp
je 0x4af77f
mov edi, dword [esp + 0x14]
jmp 0x4af621
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x30
push str.Unable_to_convert_environment_variable_to_UTF_16
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.004152bc
mov edx, dword [esp + 0x9c]
add esp, 8
cmp edx, 0x10
jb 0x4af758
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4af74e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4af74e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004036ca
add esp, 8
mov eax, dword [esp + 0x1b4]
lea ecx, [esp + 0x1c0]
cmp eax, ecx
je 0x4af774
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ebp, dword [esp + 0x10]
xor bl, bl
jmp 0x4afaeb
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
lea ecx, [esp + 0x14]
call fcn.0040d594
mov ebp, dword [esp + 0x10]
cmp dword [esp + 0x81c], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x68], xmm0
mov dword [esp + 0x70], 0
mov dword [esp + 0x3c], 0x44
mov dword [esp + 0x74], 0xffffffff
mov dword [esp + 0x78], 0xffffffff
mov dword [esp + 0x7c], 0xffffffff
je 0x4af9b5
mov eax, dword [esp + 0x818]
push ebx
push 0
sub esp, 0xc
mov dword [esp + 0x7c], 0x100
movq xmm0, qword [eax]
mov ecx, esp
mov eax, dword [eax + 8]
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
call fcn.004b0820
add esp, 0x14
mov dword [esp + 0x74], eax
cmp eax, 0xffffffff
jne 0x4af838
push 0x14
push str.cant_redirect_stdin
jmp 0x4af934
mov eax, dword [esp + 0x818]
push ebx
push 1
sub esp, 0xc
movq xmm0, qword [eax + 0xc]
mov ecx, esp
mov eax, dword [eax + 0x14]
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
call fcn.004b0820
add esp, 0x14
mov dword [esp + 0x78], eax
cmp eax, 0xffffffff
jne 0x4af87d
push dword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x15
push str.cant_redirect_stdout
jmp 0x4af934
mov esi, dword [esp + 0x818]
cmp byte [esi + 0x14], 0
je 0x4af8ef
cmp byte [esi + 0x20], 0
je 0x4af8ef
push dword [esi + 0x1c]
push dword [esi + 0x18]
push dword [esi + 0x10]
push dword [esi + 0xc]
call fcn.00402626
add esp, 0x10
test al, al
je 0x4af8ef
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [esp + 0x7c]
push 2
push 1
push 0
push eax
call esi
push eax
push dword [esp + 0x8c]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x4af9b5
push dword [esp + 0x74]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x78]
call esi
push 0x1a
push str.cant_dup_stderr_to_stdout
jmp 0x4af934
movq xmm0, qword [esi + 0x18]
mov eax, dword [esi + 0x20]
push ebx
push 2
sub esp, 0xc
mov ecx, esp
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
call fcn.004b0820
add esp, 0x14
mov dword [esp + 0x7c], eax
cmp eax, 0xffffffff
jne 0x4af9b5
push dword [esp + 0x74]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x78]
call esi
push 0x15
push str.cant_redirect_stderr
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.004152bc
mov edx, dword [esp + 0x9c]
add esp, 8
cmp edx, 0x10
jb 0x4af9ae
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4af9a4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4afb56
push edx
push ecx
call fcn.004036ca
add esp, 8
xor bl, bl
jmp 0x4afaeb
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xorps xmm0, xmm0
push 1
movups xmmword [esp + 0x30], xmm0
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
push eax
call esi
push 2
call edi
push eax
call esi
lea eax, [esp + 0x5f8]
mov dword [esp + 0x5f0], 0
mov dword [esp + 0x5ec], eax
lea eax, [esp + 0x80c]
mov dword [esp + 0x90], eax
lea eax, [esp + 0x5ec]
push 0x104
push eax
lea eax, [esp + 0x98]
mov dword [esp + 0x5fc], 0x104
push eax
lea eax, [esp + 0x40]
mov word [esp + 0xa4], 0x105
push eax
call fcn.004095cf
mov eax, dword [esp + 0x44]
add esp, 0x20
test eax, eax
je 0x4afb5c
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x2c
push str.Unable_to_convert_application_name_to_UTF_16
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.004152bc
mov edx, dword [esp + 0x9c]
add esp, 8
cmp edx, 0x10
jb 0x4afacb
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4afac1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4afac1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004036ca
add esp, 8
xor bl, bl
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x5dc]
lea ecx, [esp + 0x5e8]
cmp eax, ecx
je 0x4afaeb
push eax
call esi
add esp, 4
test ebp, ebp
je 0x4afb1c
mov ecx, dword [esp + 0x18]
mov eax, ebp
sub ecx, ebp
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x4afb12
mov ebp, dword [ebp - 4]
add ecx, 0x23
sub eax, ebp
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4afb56
push ecx
push ebp
call fcn.004036ca
add esp, 8
mov edx, dword [esp + 0xac]
cmp edx, 0x10
jb 0x4aff99
mov ecx, dword [esp + 0x98]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4aff8f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4aff8f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
lea eax, [esp + 0x3d4]
mov dword [esp + 0x3cc], 0
mov dword [esp + 0x3c8], eax
lea eax, [esp + 0x3c8]
push eax
sub esp, 8
mov dword [esp + 0x3dc], 0x104
cmp dword [esp + 0xb8], 0x10
lea eax, [esp + 0xa4]
mov ecx, esp
cmovae eax, dword [esp + 0xa4]
mov dword [ecx], eax
mov eax, dword [esp + 0xb4]
mov dword [ecx + 4], eax
lea eax, [esp + 0x30]
push eax
call fcn.00412350
mov eax, dword [esp + 0x34]
add esp, 0x10
test eax, eax
je 0x4afc5e
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x28
push str.Unable_to_convert_command_line_to_UTF_16
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.004152bc
mov edx, dword [esp + 0x9c]
add esp, 8
cmp edx, 0x10
jb 0x4afdfc
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4afc4d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4afc4d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004036ca
add esp, 8
xor bl, bl
jmp 0x4aff5b
xor ecx, ecx
mov eax, ebp
cmp ebp, dword [esp + 0x14]
cmove eax, ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x40]
push ecx
push 0
push eax
push 0x400
push 1
push 0
push 0
push dword [esp + 0x3e8]
push dword [esp + 0x600]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x74]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x20], eax
call edi
push dword [esp + 0x78]
call edi
push dword [esp + 0x7c]
call edi
test esi, esi
jne 0x4afe03
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x1a
push str.Couldnt_execute_program_
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x800]
call fcn.00407d4c
push eax
lea eax, [esp + 0x84]
push eax
push dword [esp + 0x28]
lea ecx, [esp + 0xd4]
call fcn.0041433a
push 1
push 0x924774
lea ecx, [esp + 0xd0]
call fcn.004070e5
movups xmm0, xmmword [eax]
movups xmmword [esp + 0xb0], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], esi
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [esp + 0xb0]
push eax
push ebx
movq qword [esp + 0xc8], xmm0
call fcn.004152bc
mov edx, dword [esp + 0xcc]
add esp, 8
cmp edx, 0x10
jb 0x4afda6
mov ecx, dword [esp + 0xb0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4afd9c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4afde0
push edx
push ecx
call fcn.004036ca
add esp, 8
lea ecx, [esp + 0xc8]
call fcn.0040aeed
mov edx, dword [esp + 0x94]
cmp edx, 0x10
jb 0x4afdf0
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4afde6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4afde6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004036ca
add esp, 8
lea ecx, [esp + 0x12c]
call fcn.0040aeed
xor bl, bl
jmp 0x4aff5b
mov ecx, dword [esp + 0x20]
xor esi, esi
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x30]
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
mov dword [ecx + 4], eax
cmp dword [esp + 0x820], esi
je 0x4aff82
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateJobObjectW]
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x20], esi
cmp esi, 0xffffffff
je 0x4afe9c
push 0x70
lea eax, [esp + 0x148]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x82c]
add esp, 0xc
shl eax, 0x14
mov dword [esp + 0x1a4], eax
lea eax, [esp + 0x144]
mov dword [esp + 0x154], 0x100
push 0x70
push eax
push 9
push esi
call dword [sym.imp.KERNEL32.dll_SetInformationJobObject]
test eax, eax
je 0x4afe9c
push dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x4aff82
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x1a
push str.Unable_to_set_memory_limit
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0xf
call fcn.00408698
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.004152bc
mov edx, dword [esp + 0x9c]
add esp, 8
cmp edx, 0x10
jb 0x4aff2a
mov ecx, dword [esp + 0x80]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4aff20
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4afb56
push edx
push ecx
call fcn.004036ca
add esp, 8
push 1
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0xffffffffffffffff
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esp + 0x20]
xor bl, bl
cmp esi, 0xffffffff
jne 0x4aff84
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x4aff5b
push edi
call esi
mov eax, dword [esp + 0x3c8]
lea ecx, [esp + 0x3d4]
cmp eax, ecx
je 0x4afacd
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push eax
call esi
add esp, 4
jmp 0x4afad3
mov bl, 1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x4aff53
push edx
push ecx
call fcn.004036ca
add esp, 8
mov eax, dword [esp + 0xe0]
lea ecx, [esp + 0xec]
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0xf
mov byte [esp + 0x98], 0
cmp eax, ecx
je 0x4affd3
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x7f0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004087b5
add esp, 0x7e4
ret