Function at 0x42d382
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
movsx edx, byte [0x48b468]
cmp ecx, edx
jne 0x42d3c5
push 0x48b478
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x42d3c5
mov dword [ebp - 0xc], 1
jmp 0x42d42a
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
cmp eax, 0xe
jb 0x42d423
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx + eax - 0xd]
movsx eax, byte [0x48b488]
cmp edx, eax
jne 0x42d423
push 0x48b498
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov edx, dword [ebp + 0xc]
lea eax, [edx + eax - 0xd]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x42d423
mov dword [ebp - 0xc], 2
jmp 0x42d42a
mov dword [ebp - 0xc], 3
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 1
je 0x42d4da
cmp dword [ebp - 0x20], 2
je 0x42d64d
cmp dword [ebp - 0x20], 3
je 0x42d44f
jmp 0x42d7e0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x42d46d
mov eax, dword [ebp - 4]
jmp 0x42d7e2
push 0x48b4a8
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x42d4ba
push 0
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042ce28
add esp, 0x14
cmp dword [ebp - 4], 0
jne 0x42d4b8
push 1
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042ce28
add esp, 0x14
jmp 0x42d4d2
push 0
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042ce28
add esp, 0x14
mov eax, dword [ebp - 4]
jmp 0x42d7e2
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x538], 0
je 0x42d505
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x538]
push eax
call fcn.0042b4ab
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x538], 0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x42d52f
mov eax, dword [ebp - 0x1c]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x42d53d
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x4de920
push 0
push 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042ce28
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x42d56f
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x42d57d
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x4de924
cmp dword [ebp - 0x18], 0
jne 0x42d590
cmp dword [ebp - 0x14], 0
jne 0x42d590
xor eax, eax
jmp 0x42d7e2
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
lea ecx, [eax + edx + 1]
push ecx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x538], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x538], 0
jne 0x42d5c2
xor eax, eax
jmp 0x42d7e2
push 0x3b
push 0x48b4b4
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x42d5e4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], edx
jmp 0x42d5eb
mov dword [ebp - 0x24], 0x4de928
cmp dword [ebp - 8], 0
je 0x42d5ff
cmp dword [ebp - 0x1c], 0
je 0x42d5ff
lea eax, [ebp - 0x10]
mov dword [ebp - 0x28], eax
jmp 0x42d606
mov dword [ebp - 0x28], 0x4de92c
cmp dword [ebp - 0x1c], 0
je 0x42d614
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], ecx
jmp 0x42d61b
mov dword [ebp - 0x2c], 0x4de930
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x48b4b8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x538]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x538]
jmp 0x42d7e2
mov edx, dword [ebp + 0xc]
push edx
call fcn.00432240
add esp, 4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x53c], 0
je 0x42d684
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x53c]
push edx
call fcn.0042b4ab
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0x53c], 0
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x42d6ae
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x42d6bc
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x4de934
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3fc]
and ecx, 4
test ecx, ecx
jne 0x42d6eb
push 0
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042ce28
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x42d705
mov edx, dword [ebp - 8]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x42d713
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x4de938
cmp dword [ebp - 0x18], 0
jne 0x42d726
cmp dword [ebp - 0x14], 0
jne 0x42d726
xor eax, eax
jmp 0x42d7e2
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax + 3]
push edx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x53c], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x53c], 0
jne 0x42d758
xor eax, eax
jmp 0x42d7e2
push 0x3b
push 0x48b4c0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x42d77a
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x30], ecx
jmp 0x42d781
mov dword [ebp - 0x30], 0x4de93c
cmp dword [ebp - 8], 0
je 0x42d795
cmp dword [ebp - 0x1c], 0
je 0x42d795
lea edx, [ebp - 0x10]
mov dword [ebp - 0x34], edx
jmp 0x42d79c
mov dword [ebp - 0x34], 0x4de940
cmp dword [ebp - 0x1c], 0
je 0x42d7aa
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
jmp 0x42d7b1
mov dword [ebp - 0x38], 0x4de944
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
push eax
push 0x48b4c4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x53c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x53c]
jmp 0x42d7e2
xor eax, eax
mov esp, ebp
pop ebp
ret