Function at 0x42de68
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x475280]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x30], edx
mov edi, ecx
xor esi, esi
mov dword [ebp - 0x34], edi
push esi
lea edx, [ebp - 0x38]
mov dword [ebp - 0x3c], eax
call fcn.0042fd2c
test eax, eax
jne 0x42dec5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00411710
test eax, eax
jns 0x42debb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00411710
jmp 0x42e037
mov eax, 0x80004005
jmp 0x42e037
push 0x28
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x42de9a
lea eax, [ebx + 0x18]
mov dword [ebx], edi
push eax
lea edx, [ebx + 0x14]
mov ecx, edi
call fcn.0042fd2c
mov eax, dword [ebp - 0x30]
cmp eax, 1
ja 0x42df06
mov ecx, edi
call fcn.0042fecf
test eax, eax
je 0x42e0a7
mov eax, dword [ebp - 0x30]
push 8
pop ecx
mov dword [ebx + 0x1c], eax
lea edi, [ebp - 0x28]
xor eax, eax
mov esi, 0x80
rep stosd dword es:[edi], eax
push 0x10
lea eax, [ebp - 0x28]
push eax
push 0x4067d8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x42df52
cmp eax, 0x10
ja 0x42df52
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x405d54
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x42df52
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x34]
lea eax, [ebx + 4]
push eax
push esi
push 1
xor edx, edx
mov ecx, edi
call fcn.004443aa
mov esi, eax
test esi, esi
jns 0x42df76
push esi
push 0xff4
jmp 0x42e022
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x28]
push 0x10
rep stosd dword es:[edi], eax
pop edi
push edi
lea eax, [ebp - 0x28]
mov esi, 0x400
push eax
push 0x406830
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x42dfc0
cmp eax, edi
ja 0x42dfc0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x405d54
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x42dfc0
mov esi, dword [ebp - 0x2c]
push edi
lea eax, [ebp - 0x28]
push eax
push 0x406864
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x42dffa
cmp eax, edi
ja 0x42dffa
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x405d54
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x42dffa
mov eax, dword [ebp - 0x2c]
jmp 0x42dffd
xor eax, eax
inc eax
mov edx, dword [ebp - 0x38]
lea ecx, [ebx + 8]
mov edi, dword [ebp - 0x34]
push ecx
push esi
shr edx, 0xc
mov ecx, edi
push eax
and edx, 4
call fcn.004443aa
mov esi, eax
test esi, esi
jns 0x42e048
push esi
push 0x1016
mov ecx, 0x40680c
call fcn.0043f87d
mov edx, ebx
mov ecx, edi
call fcn.0042de28
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00471d10
leave
ret 4
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
mov eax, dword [ebp - 0x30]
dec eax
push eax
mov eax, dword [ebx + 8]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
test dword [ebp - 0x38], 0x1000
je 0x42e0a3
mov eax, dword [ebp - 0x30]
push 4
pop ecx
cmp eax, ecx
ja 0x42e07d
mov ecx, eax
lea eax, [ebx + 0xc]
xor edx, edx
push eax
push 0xa
push ecx
mov ecx, edi
call fcn.004443aa
mov esi, eax
test esi, esi
jns 0x42e0a7
push esi
push 0x1027
mov ecx, 0x40680c
call fcn.0043f87d
test esi, esi
js 0x42e02c
mov eax, dword [0x475b8c]
and dword [ebx + 0x24], 0
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x3c]
mov dword [eax], ebx
test edi, edi
je 0x42e035
mov dword [edi + 0xac], ebx
jmp 0x42e035