Function at 0x4097e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x102c0
call fcn.0043f4d0
push ebx
push esi
push edi
mov dword [ebp - 4], 1
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10038], 0
mov ecx, 0x4006
xor eax, eax
lea edi, [ebp - 0x10034]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1003c], 0
mov byte [ebp - 0x10214], 0
mov ecx, 0x75
xor eax, eax
lea edi, [ebp - 0x10213]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x10230], 0
mov ecx, 6
xor eax, eax
lea edi, [ebp - 0x1022f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x10278], 0
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x10277]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x1001c
push 0
lea eax, [ebp - 0x10038]
push eax
call fcn.0043ee00
add esp, 0xc
push 0x1d8
push 0
lea ecx, [ebp - 0x10214]
push ecx
call fcn.0043ee00
add esp, 0xc
push 0x1c
push 0
lea edx, [ebp - 0x10230]
push edx
call fcn.0043ee00
add esp, 0xc
push 0x48
push 0
lea eax, [ebp - 0x10278]
push eax
call fcn.0043ee00
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10038], ecx
mov edx, dword [ebp + 8]
push edx
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x1027c], eax
cmp dword [ebp - 0x1027c], 0xffffffff
jne 0x409911
xor eax, eax
jmp 0x409cea
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0x18
mov eax, dword [ebp - 8]
push eax
push 8
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1003c], eax
cmp dword [ebp - 0x1003c], 0
jne 0x409954
mov edx, dword [ebp - 0x1027c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409cea
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x1003c]
push edx
push 0
mov eax, dword [ebp - 0x1027c]
push eax
call dword [0x1121fc0]
mov dword [ebp - 0x10280], eax
cmp dword [ebp - 0x10280], 0
jl 0x4099fc
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0xc]
jae 0x4099fc
cmp dword [ebp - 0x1003c], 0
je 0x4099a5
mov edx, dword [ebp - 0x1003c]
push edx
push 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
push ecx
push 8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1003c], eax
cmp dword [ebp - 0x1003c], 0
jne 0x4099d8
mov eax, dword [ebp - 0x1027c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x409cea
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x1003c]
push eax
push 0
mov ecx, dword [ebp - 0x1027c]
push ecx
call dword [0x1121fc0]
mov dword [ebp - 0x10280], eax
cmp dword [ebp - 0x10280], 0
jl 0x409ca8
mov edx, dword [ebp - 0x1003c]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x10034], eax
mov ecx, dword [ebp - 0x1003c]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x10024], edx
mov eax, dword [ebp - 0x1003c]
mov ecx, dword [eax]
mov dword [ebp - 0x10020], ecx
mov edx, dword [ebp - 0x1003c]
mov eax, dword [edx + 4]
mov dword [ebp - 0x1002c], eax
mov ecx, dword [ebp - 0x1003c]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x10028], edx
mov eax, dword [ebp - 0x1003c]
cmp dword [eax + 4], 0
je 0x409c88
lea ecx, [ebp - 0x10]
push ecx
push 0x1d8
lea edx, [ebp - 0x10214]
push edx
mov eax, dword [ebp - 0x1003c]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x1027c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409c88
mov eax, dword [ebp - 0x10040]
mov dword [ebp - 0x10030], eax
mov cl, byte [ebp - 0x10212]
mov byte [ebp - 0x1001c], cl
mov dword [ebp - 0x10], 0
lea edx, [ebp - 0x10]
push edx
push 0x48
lea eax, [ebp - 0x10278]
push eax
mov ecx, dword [ebp - 0x10204]
push ecx
mov edx, dword [ebp - 0x1027c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409c88
mov eax, dword [ebp - 0x10238]
and eax, 0xffff
test eax, eax
jle 0x409baf
mov ecx, dword [ebp - 0x10238]
and ecx, 0xffff
push ecx
push 8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x409baf
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x10238]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10234]
push eax
mov ecx, dword [ebp - 0x1027c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409b8f
mov edx, dword [ebp - 0x10238]
and edx, 0xffff
cmp edx, 0x7fff
jb 0x409b5d
mov dword [ebp - 0x14], 0x7ffe
jmp 0x409b6b
mov eax, dword [ebp - 0x10238]
and eax, 0xffff
mov dword [ebp - 0x14], eax
push 0
push 0
push 0x7fff
lea ecx, [ebp - 0x801c]
push ecx
mov edx, dword [ebp - 0x14]
shr edx, 1
push edx
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x409baf
mov dword [ebp - 4], 0
jmp 0x409ce8
mov eax, dword [ebp - 0x10240]
and eax, 0xffff
test eax, eax
jle 0x409c88
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x10240]
and ecx, 0xffff
push ecx
push 8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x409c88
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x10240]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x1023c]
push eax
mov ecx, dword [ebp - 0x1027c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409c6b
mov edx, dword [ebp - 0x10240]
and edx, 0xffff
cmp edx, 0x7fff
jb 0x409c39
mov dword [ebp - 0x14], 0x7ffe
jmp 0x409c47
mov eax, dword [ebp - 0x10240]
and eax, 0xffff
mov dword [ebp - 0x14], eax
push 0
push 0
push 0x7fff
lea ecx, [ebp - 0x1001b]
push ecx
mov edx, dword [ebp - 0x14]
shr edx, 1
push edx
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x409c88
mov dword [ebp - 4], 0
jmp 0x409ce6
cmp dword [ebp - 0x10038], 4
jne 0x409ca8
push 0x7fff
lea eax, [ebp - 0x1001b]
push eax
push str._SystemRoot_System32_ntoskrnl.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp dword [ebp - 0x1003c], 0
je 0x409cc4
mov ecx, dword [ebp - 0x1003c]
push ecx
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x1027c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0xc]
lea esi, [ebp - 0x10038]
mov ecx, 0x4007
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 4]
jmp 0x409cea
jmp 0x409ca8
jmp 0x409ca8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret