Function at 0x10081db0
Capabilities:
Query environment variable
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x101114bc]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x210], 0
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0x100f875c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x21c], eax
cmp dword [ebp + 0xc], 1
jb 0x10081e03
cmp dword [ebp + 0xc], 0x1000
jbe 0x10081e15
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1008203b
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call fcn.1007fae0
test eax, eax
jne 0x10081e3b
jmp 0x1008203b
cmp dword [ebp - 0x21c], 0
je 0x10081e50
cmp dword [ebp - 0x21c], 0x104
jb 0x10081e5a
jmp 0x1008203b
push bind
lea edx, [ebp - 0x220]
push edx
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.10080860
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jl 0x10081eb7
push bind
push 0x100f8764
push 0
mov ecx, 0x104
sub ecx, dword [ebp - 0x220]
push ecx
mov edx, dword [ebp - 0x220]
lea eax, [ebp + edx - 0x108]
push eax
call fcn.10080560
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp - 0x214]
mov dword [ebp - 0x218], ecx
cmp dword [ebp - 0x218], 0
jge 0x10081ed6
jmp 0x1008203b
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x210]
lea edx, [ecx + eax + 0xc]
push edx
push 0x100f877c
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.10080480
add esp, 0x10
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
jge 0x10081f1b
jmp 0x1008203b
push 0x10
push 0
lea ecx, [ebp - 0x238]
push ecx
call fcn.10088c20
add esp, 0xc
push 0x44
push 0
lea edx, [ebp - 0x27c]
push edx
call fcn.10088c20
add esp, 0xc
mov dword [ebp - 0x27c], 0x44
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x27c]
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x108]
push eax
call dword [ebp + 0x14]
test eax, eax
je 0x1008203b
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x210]
push eax
push 0x100f8804
mov ecx, dword [ebp - 0x238]
push ecx
call fcn.10081240
test eax, eax
jne 0x10081fd0
push 0xffffffffffffffff
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1008203b
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0xffffffffffffffff
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x224], 0x1f4
lea ecx, [ebp - 0x224]
push ecx
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x224], 0
je 0x10082031
jmp 0x1008203b
mov dword [ebp - 0x228], 1
lea edx, [ebp - 0x210]
push edx
call fcn.1007ff70
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10085c29
mov esp, ebp
pop ebp
ret 0x10