Function at 0x10004730
Capabilities:
Create thread
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10053690
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x1005f004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0
test eax, eax
jne 0x10004928
mov dword [0x100611d0], eax
push 0x1c
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x14], eax
push eax
mov eax, 0xf8fe8690
xor eax, eax
sbb eax, esi
nop
pop eax
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004798
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.10010ed5
mov ebx, dword [ebp - 0x14]
add esp, 4
push esi
push 0
push eax
mov dword [ebx], eax
call fcn.10012c40
mov ecx, dword [ebp + 0x14]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100047c4
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.10010ed5
add esp, 4
mov dword [ebx + 4], eax
push esi
push 0
push eax
call fcn.10012c40
mov ecx, dword [ebp + 0x18]
add esp, 0xc
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100047f0
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.10010ed5
add esp, 4
mov dword [ebx + 8], eax
push esi
push 0
push eax
call fcn.10012c40
add esp, 0xc
push eax
mov eax, 0x3f281300
sbb eax, esi
sbb eax, esi
add eax, esi
or eax, edi
pop eax
mov edi, dword [ebp + 0x1c]
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004830
sub ecx, edx
lea esi, [ecx + 1]
push esi
call fcn.10010ed5
mov ebx, dword [ebp - 0x14]
add esp, 4
push esi
push 0
push eax
mov dword [ebx + 0xc], eax
call fcn.10012c40
mov esi, dword [ebp + 0x20]
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004860
sub ecx, edx
lea eax, [ecx + 1]
push eax
mov dword [ebp + 0x1c], eax
call fcn.10010ed5
add esp, 4
mov dword [ebx + 0x10], eax
push dword [ebp + 0x1c]
push 0
push eax
call fcn.10012c40
mov eax, dword [ebp + 0x1c]
add esp, 0xc
cdq
xor eax, edx
sub eax, edx
cmp eax, 0xfffffffe
jne 0x100048a0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov ecx, dword [ebx]
mov edx, dword [ebp + 0x10]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100048a5
mov ecx, dword [ebx + 4]
mov edx, dword [ebp + 0x14]
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100048c0
mov ecx, dword [ebx + 8]
mov edx, dword [ebp + 0x18]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100048d4
mov ecx, dword [ebx + 0xc]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100048e5
mov ecx, dword [ebx + 0x10]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x100048f6
xor eax, eax
cmp dword [ebp + 0xc], eax
sete al
mov dword [ebx + 0x14], eax
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x10004986
push eax
call fcn.100305ee
add esp, 4
cmp eax, 1
jne 0x10004986
mov al, al
jmp 0x10004988
cmp eax, 1
jne 0x10004946
mov dword [0x100611d0], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
cmp eax, 2
jne 0x1000495a
mov dword [0x100611d4], 0
jmp 0x10004772
cmp eax, 3
jne 0x10004772
mov dword [0x100611d4], 1
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
xor al, al
mov byte [ebx + 0x18], al
call fcn.1001c67b
push eax
sbb eax, esp
sbb eax, edx
add eax, eax
sbb eax, esi
sbb eax, esp
add eax, edx
pop eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
mov eax, dword [ebp - 0x14]
push 0
push eax
push 0x10004a00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24