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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x574
mov eax, dword [0x10026008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x110]
mov ebx, edx
push 0
push eax
mov edi, ecx
call fcn.1000a170
push 0x2e
push edi
call fcn.10009e40
mov esi, eax
add esp, 0x14
test esi, esi
je 0x100042c8
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.1000a170
push 0x20
push esi
call fcn.10009e40
add esp, 0x14
test eax, eax
je 0x100040e0
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100040b0
sub ecx, edx
lea eax, [ecx - 1]
test eax, eax
jle 0x100040fd
cmp byte [eax + esi], 0x20
je 0x100040cd
dec eax
test eax, eax
jg 0x100040c0
jmp 0x100040fd
push eax
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.1000e620
add esp, 0xc
jmp 0x100040fd
lea ecx, [ebp - 0x218]
sub ecx, esi
nop dword [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x100040f0
push ecx
push 0x104
push ecx
lea eax, [ebp - 0x110]
mov ecx, connect
push eax
push 1
push 0
lea edx, [ebp - 0x218]
call fcn.10006af0
add esp, 0x18
test eax, eax
je 0x100042c8
push 0x1f4
lea eax, [ebp - 0x518]
push 0
push eax
call fcn.1000a170
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x518]
push str._s_shellopencommand
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x104
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.1000a170
push 0x104
lea eax, [ebp - 0x320]
push 0
push eax
call fcn.1000a170
add esp, 0x2c
lea eax, [ebp - 0x320]
lea edx, [ebp - 0x518]
push 0x104
push ecx
push eax
push 2
push 0
mov ecx, connect
call fcn.10006af0
add esp, 0x18
test eax, eax
je 0x100042c8
push 0x104
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea eax, [ebp - 0x110]
push 0x10022034
push eax
call fcn.10009bd0
add esp, 8
test eax, eax
jne 0x10004214
lea eax, [ebp - 0x110]
push 0x10022018
push eax
call fcn.10009bd0
add esp, 8
test eax, eax
jne 0x10004214
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x110]
push 0x10022038
push eax
call esi
push edi
lea eax, [ebp - 0x110]
push eax
call esi
jmp 0x1000421c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x570], 0x44
xorps xmm0, xmm0
movlpd qword [ebp - 0x56c], xmm0
movlpd qword [ebp - 0x564], xmm0
movlpd qword [ebp - 0x55c], xmm0
movlpd qword [ebp - 0x554], xmm0
movlpd qword [ebp - 0x54c], xmm0
movlpd qword [ebp - 0x544], xmm0
movlpd qword [ebp - 0x53c], xmm0
movlpd qword [ebp - 0x534], xmm0
test ebx, ebx
je 0x10004279
mov dword [ebp - 0x568], str.WinSta0Default
jmp 0x1000428c
xor eax, eax
mov dword [ebp - 0x544], 1
mov word [ebp - 0x540], ax
lea eax, [ebp - 0x528]
push eax
lea eax, [ebp - 0x570]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10008398
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10008398
mov esp, ebp
pop ebp
ret