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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43788b
mov eax, dword fs:[0]
push eax
mov eax, 0x202f4
call fcn.004309f0
mov eax, dword [0x442308]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
cmp dword [esi + 0x14], edi
jne 0x4034b6
mov eax, 0x80070057
jmp 0x403999
push 0xfffe
lea ecx, [ebp - 0x10216]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x10218], ax
call fcn.00423660
mov ebx, 8
add esp, 0xc
cmp dword [esi + 0x18], ebx
jb 0x4034e3
mov esi, dword [esi + 4]
jmp 0x4034e6
add esi, 4
lea eax, [ebp - 0x10218]
mov ecx, eax
mov edx, 0x8000
sub esi, ecx
lea ecx, [edx + 0x7fff7ffe]
test ecx, ecx
je 0x403515
movzx ecx, word [esi + eax]
cmp cx, di
je 0x403515
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4034f5
jmp 0x403519
cmp edx, edi
jne 0x40351c
sub eax, 2
xor edx, edx
push 0x206
mov word [eax], dx
lea ecx, [ebp - 0x216]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x218], ax
call fcn.00423660
mov eax, dword [ebp + 0xc]
add esp, 0xc
cmp dword [eax + 0x18], ebx
jb 0x40354c
mov esi, dword [eax + 4]
jmp 0x40354f
lea esi, [eax + 4]
lea eax, [ebp - 0x218]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
mov edi, edi
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x403580
movzx ecx, word [esi + eax]
cmp cx, di
je 0x403580
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x403560
jmp 0x403584
cmp edx, edi
jne 0x403587
sub eax, 2
xor edx, edx
mov word [eax], dx
mov ecx, 0x10000
lea eax, [ebp - 0x20254]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x403597
mov ebx, 7
xor eax, eax
mov dword [ebp - 0x10254], edi
mov dword [ebp - 0x10238], ebx
mov dword [ebp - 0x1023c], edi
mov word [ebp - 0x1024c], ax
lea ecx, [ebp - 0x10250]
mov dword [ebp - 4], edi
call fcn.00402d70
test eax, eax
jl 0x403628
xor ecx, ecx
push 4
mov word [ebp - 0x202b8], cx
push str.TEMP
lea ecx, [ebp - 0x202bc]
mov dword [ebp - 0x202a4], ebx
mov dword [ebp - 0x202a8], edi
call fcn.00401820
lea eax, [ebp - 0x10250]
lea ecx, [ebp - 0x202bc]
lea esi, [ebp - 0x20254]
call fcn.00402cb0
cmp dword [ebp - 0x202a4], 8
jb 0x403628
mov edx, dword [ebp - 0x202b8]
push edx
call fcn.00423621
add esp, 4
lea ecx, [ebp - 0x10250]
call fcn.00403090
test eax, eax
jl 0x40368c
push ebx
xor eax, eax
push str.APPDATA
lea ecx, [ebp - 0x20284]
mov dword [ebp - 0x2026c], ebx
mov dword [ebp - 0x20270], edi
mov word [ebp - 0x20280], ax
call fcn.00401820
lea eax, [ebp - 0x10250]
lea ecx, [ebp - 0x20284]
lea esi, [ebp - 0x20254]
call fcn.00402cb0
cmp dword [ebp - 0x2026c], 8
jb 0x40368c
mov ecx, dword [ebp - 0x20280]
push ecx
call fcn.00423621
add esp, 4
lea ecx, [ebp - 0x10250]
call fcn.00403350
test eax, eax
jl 0x4036f1
push 0xb
xor edx, edx
push str.USERPROFILE
lea ecx, [ebp - 0x202a0]
mov dword [ebp - 0x20288], ebx
mov dword [ebp - 0x2028c], edi
mov word [ebp - 0x2029c], dx
call fcn.00401820
lea eax, [ebp - 0x10250]
lea ecx, [ebp - 0x202a0]
lea esi, [ebp - 0x20254]
call fcn.00402cb0
cmp dword [ebp - 0x20288], 8
jb 0x4036f1
mov eax, dword [ebp - 0x2029c]
push eax
call fcn.00423621
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
xor esi, esi
mov dword [ebp - 0x20268], edi
cmp word [edi], si
je 0x40382b
lea ebx, [ebx]
xor ecx, ecx
mov eax, edi
mov dword [ebp - 0x1021c], ebx
mov dword [ebp - 0x10220], esi
mov word [ebp - 0x10230], cx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x403730
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x10234]
call fcn.00401820
mov edx, dword [ebp - 0x10220]
push 4
push str.TEMP
lea eax, [ebp - 0x10234]
lea edi, [edi + edx*2 + 2]
call fcn.00403f60
cmp eax, 0xffffffff
jne 0x4037f5
push 3
push 0x43c784
lea eax, [ebp - 0x10234]
call fcn.00403f60
cmp eax, 0xffffffff
jne 0x4037f5
push ebx
push str.APPDATA
lea eax, [ebp - 0x10234]
call fcn.00403f60
cmp eax, 0xffffffff
jne 0x4037f5
push 0xb
push str.USERPROFILE
lea eax, [ebp - 0x10234]
call fcn.00403f60
cmp eax, 0xffffffff
jne 0x4037f5
lea eax, [ebp - 0x10234]
lea esi, [ebp - 0x20254]
call fcn.00402d20
cmp dword [ebp - 0x1021c], 8
jb 0x4037de
mov eax, dword [ebp - 0x10230]
push eax
call fcn.00423621
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x10220], 0
mov word [ebp - 0x10230], cx
xor esi, esi
jmp 0x40381c
cmp dword [ebp - 0x1021c], 8
jb 0x40380d
mov edx, dword [ebp - 0x10230]
push edx
call fcn.00423621
add esp, 4
xor eax, eax
mov dword [ebp - 0x10220], esi
mov word [ebp - 0x10230], ax
mov dword [ebp - 0x1021c], ebx
cmp word [edi], si
jne 0x403710
mov ecx, dword [ebp - 0x20268]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
push 0x44
lea edx, [ebp - 0x20300]
push esi
push edx
call fcn.00423660
add esp, 0xc
push 0x60081
push esi
xor eax, eax
push esi
push str.default
mov dword [ebp - 0x20300], 0x44
mov dword [ebp - 0x20264], eax
mov dword [ebp - 0x20260], eax
mov dword [ebp - 0x2025c], eax
mov dword [ebp - 0x20258], eax
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov esi, eax
test esi, esi
jne 0x4038a8
cmp dword [ebp - 0x10238], 8
jb 0x40389e
mov eax, dword [ebp - 0x1024c]
push eax
call fcn.00423621
add esp, 4
mov eax, 0x80070005
jmp 0x403999
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x8001
call edi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x10254]
xor ecx, ecx
mov word [ebp + edx*2 - 0x20254], cx
movzx edx, word [ebp - 0x218]
neg edx
lea eax, [ebp - 0x20264]
push eax
sbb edx, edx
lea ecx, [ebp - 0x20300]
push ecx
lea eax, [ebp - 0x218]
and edx, eax
push edx
lea ecx, [ebp - 0x20254]
push ecx
push 0x400
push 0
push 0
push 0
lea edx, [ebp - 0x10218]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x403972
mov eax, dword [ebp - 0x20264]
test eax, eax
je 0x403931
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20264], 0
mov eax, dword [ebp - 0x20260]
test eax, eax
je 0x40394c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20260], 0
push ebx
call edi
push esi
call dword [sym.imp.USER32.dll_CloseDesktop]
cmp dword [ebp - 0x10238], 8
jb 0x40396e
mov eax, dword [ebp - 0x1024c]
push eax
call fcn.00423621
add esp, 4
xor eax, eax
jmp 0x403999
push ebx
call edi
push esi
call dword [sym.imp.USER32.dll_CloseDesktop]
cmp dword [ebp - 0x10238], 8
jb 0x403994
mov ecx, dword [ebp - 0x1024c]
push ecx
call fcn.00423621
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042364d
mov esp, ebp
pop ebp
ret