Function at 0x401a65
Capabilities:
Create process on windows
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xaf0
mov eax, dword [0x4050b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
xor eax, eax
push 0x4013fc
push esi
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ebx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
call edi
pop ecx
pop ecx
test eax, eax
je 0x401abd
push 0x401bf0
push esi
call edi
pop ecx
pop ecx
test eax, eax
jne 0x402236
push 0x104
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], 1
push 0x401bbc
call dword [sym.imp.api_ms_win_core_processenvironment_l1_2_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x401ae8
lea esi, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
xor eax, eax
cmp dword [ebp + 0x14], eax
jne 0x402248
inc eax
mov edi, eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
mov ax, word [ebp + 0x18]
mov word [ebp - 0xa48], ax
xor eax, eax
mov word [ebp - 0xa46], ax
xor ecx, ecx
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
push ecx
push ecx
push 0x20
mov eax, ebx
neg eax
sbb eax, eax
push ecx
push ecx
not eax
and eax, esi
push ecx
push eax
neg ebx
sbb eax, eax
and eax, esi
push eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], 0x44
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], esi
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], esi
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ecx
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_CreateProcessW]
mov ebx, eax
test ebx, ebx
je 0x402396
cmp dword [ebp + 0x10], 0
jne 0x402584
push dword [ebp - 0xa34]
mov esi, dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
call esi
test edi, edi
je 0x401ba7
push dword [ebp - 0xa30]
call esi
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004013ef
leave
ret 0x18
push 0x104
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
push esi
jmp 0x401ad8
mov edi, eax
cmp dword [0x405410], eax
jne 0x402282
push eax
push eax
push 0x4031e8
mov ebx, eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_1.dll_LoadLibraryExW]
test eax, eax
je 0x401ba7
push 0x402598
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_1.dll_GetProcAddress]
mov dword [0x405410], eax
test eax, eax
je 0x401ba7
mov ecx, esi
lea edx, [ecx + 2]
xor ebx, ebx
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x402289
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ebx
test ebx, ebx
jne 0x4022bb
xor eax, eax
jmp 0x401ba9
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xa18]
jne 0x4022c0
sub ecx, edx
sar ecx, 1
mov edx, esi
lea eax, [ecx + 1]
mov esi, ebx
call fcn.004020e3
cmp dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], edi
jne 0x402305
mov ecx, ebx
call fcn.0040356f
mov edi, eax
test edi, edi
je 0x402305
xor eax, eax
cmp word [edi], ax
je 0x402303
mov word [edi], ax
add edi, 2
jmp 0x402305
mov edi, eax
mov esi, ebx
call fcn.004032b9
push 0x3c
pop esi
xor eax, eax
push esi
push eax
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
call sub.msvcrt.dll_memset
movzx eax, word [ebp + 0x18]
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
add esp, 0xc
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], esi
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], 0x640
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ebx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], edi
mov dword [ebp - 0xaa8], 0x4025a8
call dword [0x405410]
mov ebx, eax
test ebx, ebx
je 0x402385
cmp dword [ebp + 0x10], 0
je 0x402379
push 0xffffffffffffffff
push dword [ebp - 0xa7c]
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WaitForSingleObject]
push dword [ebp - 0xa7c]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
push dword [ebp - 0xa14]
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
jmp 0x401ba7
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
cmp eax, 0x2e4
jne 0x4024f2
cmp dword [ebp + 0x1c], ebx
je 0x4024f2
xor eax, eax
mov edi, eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
cmp dword [0x405410], eax
jne 0x4023f2
push eax
push eax
push 0x4031e8
mov ebx, eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_1.dll_LoadLibraryExW]
test eax, eax
je 0x4024f2
push 0x402598
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_1.dll_GetProcAddress]
mov dword [0x405410], eax
test eax, eax
je 0x4024f2
mov ecx, esi
lea edx, [ecx + 2]
xor ebx, ebx
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4023f9
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ebx
test ebx, ebx
je 0x4022b4
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xa18]
jne 0x40242d
sub ecx, edx
sar ecx, 1
mov edx, esi
lea eax, [ecx + 1]
mov esi, ebx
call fcn.004020e3
cmp dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], edi
jne 0x402472
mov ecx, ebx
call fcn.0040356f
mov edi, eax
test edi, edi
je 0x402472
xor eax, eax
cmp word [edi], ax
je 0x402470
mov word [edi], ax
add edi, 2
jmp 0x402472
mov edi, eax
mov esi, ebx
call fcn.004032b9
push 0x3c
pop esi
xor eax, eax
push esi
push eax
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
call sub.msvcrt.dll_memset
movzx eax, word [ebp + 0x18]
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
add esp, 0xc
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], esi
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], 0x640
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], ebx
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], edi
mov dword [ebp - 0xae4], 0x4025b4
call dword [0x405410]
mov ebx, eax
test ebx, ebx
je 0x4024de
mov eax, dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
mov dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], eax
push dword [ebp - 0xa20]
call dword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
test ebx, ebx
jne 0x402579
call fcn.004032f4
test eax, eax
jne 0x401ba7
mov ecx, dword fs:[0x30]
mov eax, dword [reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
cmp eax, dword [ecx + reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
je 0x401ba7
cmp dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError], 1
jne 0x401ba7
call fcn.00401c97
test al, al
je 0x401ba7
mov esi, dword [sym.imp.api_ms_win_core_libraryloader_l1_1_1.dll_LoadStringW]
mov edi, 0x200
push edi
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
push 0x648
xor eax, eax
push eax
call esi
push edi
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
push 0x647
xor eax, eax
push eax
call esi
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
lea eax, reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError
push eax
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_DisplayMessageAndExitWindows]
jmp 0x401ba7
mov edi, dword [ebp - reloc.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
jmp 0x401b83
push 0xffffffffffffffff
push dword [ebp - 0xa34]
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WaitForSingleObject]
jmp 0x401b8d