Function at 0x403920
Capabilities:
Create process on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xacc
mov eax, dword [0x40a070]
xor eax, esp
mov dword [esp + 0xac8], eax
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
push 0x401574
push edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x403998
push 0x401588
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x403998
push 0x104
lea eax, [esp + 0xc4]
push eax
push edi
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4039ea
lea edi, [esp + 0xc0]
jmp 0x4039ea
push 0x104
lea eax, [esp + 0xc4]
mov dword [esp + 0x20], 1
push eax
push 0x4015a4
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4039c3
lea edi, [esp + 0xc0]
mov eax, dword [section..data]
cmp eax, section..data
je 0x4039ea
test byte [eax + 0x1c], 1
je 0x4039ea
cmp byte [eax + 0x19], 4
jb 0x4039ea
push edi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xf
pop ecx
call fcn.004025f5
cmp dword [ebp + 0x14], 0
je 0x403b2b
xor eax, eax
mov esi, eax
cmp dword [0x40a470], eax
jne 0x403a30
push eax
push eax
push 0x401540
mov ebx, eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
test eax, eax
je 0x403e22
push 0x4015d8
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov dword [0x40a470], eax
test eax, eax
je 0x403e22
mov ecx, edi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x403a37
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x403d5f
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [esp + 0x14]
jne 0x403a65
sub edx, ecx
mov ecx, ebx
sar edx, 1
push edi
inc edx
call fcn.004024e0
cmp dword [esp + 0x18], esi
jne 0x403aa3
mov ecx, ebx
call fcn.004038ce
mov esi, eax
test esi, esi
je 0x403aa3
xor eax, eax
cmp word [esi], ax
je 0x403aa1
mov word [esi], ax
add esi, 2
jmp 0x403aa3
mov esi, eax
mov ecx, ebx
call fcn.00403549
push 0x3c
pop edi
xor eax, eax
push edi
push eax
lea eax, [esp + 0x34]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
movzx eax, word [ebp + 0x18]
add esp, 0xc
mov dword [esp + 0x48], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x40], esi
mov esi, dword [0x40a470]
mov ecx, esi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0x640
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x4015e8
call dword [0x40b224]
call esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x403b1b
cmp dword [ebp + 0x10], 0
je 0x403b11
push 0xffffffffffffffff
push dword [esp + 0x68]
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
push dword [esp + 0x64]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
push ebx
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov ebx, dword [esp + 0x10]
jmp 0x403e22
mov eax, ebx
mov ecx, ebx
neg eax
sbb eax, eax
not eax
and eax, edi
neg ecx
mov dword [esp + 0x24], eax
sbb ecx, ecx
and ecx, edi
mov dword [esp + 0x28], ecx
mov dx, word [ebp + 0x18]
xor ebx, ebx
mov word [esp + 0xa8], dx
xor esi, esi
xor edx, edx
mov dword [esp + 0x78], 0x44
mov word [esp + 0xaa], dx
inc esi
lea edx, [esp + 0x68]
mov dword [esp + 0x7c], edi
push edx
lea edx, [esp + 0x7c]
mov dword [esp + 0x88], edi
push edx
push ebx
push ebx
push 0x20
push ebx
push ebx
push ebx
push eax
push ecx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xcc], esi
mov dword [esp + 0xd4], ebx
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessW]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x403d59
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x2e4
jne 0x403d66
cmp dword [ebp + 0x1c], ebx
je 0x403d66
mov esi, ebx
mov dword [esp + 0x20], ebx
cmp dword [0x40a470], ebx
jne 0x403c21
xor eax, eax
push eax
push eax
push 0x401540
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
test eax, eax
je 0x403d6a
push 0x4015d8
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov dword [0x40a470], eax
test eax, eax
je 0x403d6a
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x403c26
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x403d5f
mov edx, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [esp + 0x14]
jne 0x403c54
sub edx, ecx
mov ecx, ebx
sar edx, 1
push edi
inc edx
call fcn.004024e0
cmp dword [esp + 0x18], esi
jne 0x403c92
mov ecx, ebx
call fcn.004038ce
mov esi, eax
test esi, esi
je 0x403c92
xor eax, eax
cmp word [esi], ax
je 0x403c90
mov word [esi], ax
add esi, 2
jmp 0x403c92
mov esi, eax
mov ecx, ebx
call fcn.00403549
xor eax, eax
push 0x3c
push eax
lea eax, [esp + 0x34]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
movzx eax, word [ebp + 0x18]
add esp, 0xc
mov dword [esp + 0x48], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x40], esi
mov esi, dword [0x40a470]
mov ecx, esi
push eax
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x34], 0x640
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x4015f4
call dword [0x40b224]
call esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x403cf8
mov eax, dword [esp + 0x64]
mov dword [esp + 0x68], eax
push ebx
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x403d6a
mov esi, dword [esp + 0x20]
cmp dword [ebp + 0x10], 0
je 0x403d1d
push 0xffffffffffffffff
push dword [esp + 0x6c]
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
push dword [esp + 0x68]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test esi, esi
je 0x403d35
push dword [esp + 0x6c]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
cmp dword [ebp + 0x10], 0
je 0x403e22
call fcn.00407b4a
test al, al
jne 0x403e22
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
jmp 0x403b45
mov ebx, dword [esp + 0x10]
jmp 0x403d0b
xor eax, eax
jmp 0x403e24
mov ebx, dword [esp + 0x10]
mov eax, dword [section..data]
mov esi, section..data
cmp eax, esi
je 0x403d9f
test byte [eax + 0x1c], 1
je 0x403d9f
cmp byte [eax + 0x19], 2
jb 0x403d9f
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
mov eax, dword [section..data]
push edi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x10
pop ecx
call fcn.004027bd
call fcn.0040358b
test al, al
jne 0x403e22
cmp dword [esp + 0x1c], 1
jne 0x403e22
call fcn.00407b4a
test al, al
je 0x403e22
mov eax, dword [section..data]
cmp eax, esi
je 0x403ddb
test byte [eax + 0x1c], 1
je 0x403ddb
cmp byte [eax + 0x19], 2
jb 0x403ddb
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x11
pop ecx
call fcn.004025d3
mov esi, 0x200
lea eax, [esp + 0x2d0]
push esi
push eax
push 0x648
xor edi, edi
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadStringW]
push esi
lea eax, [esp + 0x6d4]
push eax
push 0x647
push edi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadStringW]
lea eax, [esp + 0x2d0]
push eax
lea eax, [esp + 0x6d4]
push eax
call dword [sym.imp.ext_ms_win_session_userinit_l1_1_0.dll_DisplayMessageAndExitWindows]
mov eax, ebx
mov ecx, dword [esp + 0xad4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407f10
mov esp, ebp
pop ebp
ret 0x18