Function at 0x417b05
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0
mov byte [ebp - 0x10], 0
xor eax, eax
mov byte [ebp - 0xf], al
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp + 0xc], 0
je 0x417b6b
mov ecx, 0x47246c
test ecx, ecx
je 0x417b6b
push 0x47247c
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x417b6b
mov dword [ebp - 0xc], 1
jmp 0x417bd1
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
cmp eax, 0xe
jb 0x417bca
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]
test eax, eax
je 0x417bca
mov ecx, 0x47248c
test ecx, ecx
je 0x417bca
push 0x47249c
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax - 0xd]
push edx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x417bca
mov dword [ebp - 0xc], 2
jmp 0x417bd1
mov dword [ebp - 0xc], 3
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 1
je 0x417c81
cmp dword [ebp - 0x20], 2
je 0x417df4
cmp dword [ebp - 0x20], 3
je 0x417bf6
jmp 0x417f87
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x417c14
mov eax, dword [ebp - 4]
jmp 0x417f89
push 0x4724ac
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x417c61
push 0
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041708b
add esp, 0x14
cmp dword [ebp - 4], 0
jne 0x417c5f
push 1
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041708b
add esp, 0x14
jmp 0x417c79
push 0
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041708b
add esp, 0x14
mov eax, dword [ebp - 4]
jmp 0x417f89
mov eax, dword [ebp + 8]
cmp dword [eax + 0x538], 0
je 0x417cac
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x538]
push edx
call fcn.0041ac76
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax + 0x538], 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 0x417cd6
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x417ce4
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x484908
push 0
push 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041708b
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x417d16
mov eax, dword [ebp - 8]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x417d24
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x48490c
cmp dword [ebp - 0x18], 0
jne 0x417d37
cmp dword [ebp - 0x14], 0
jne 0x417d37
xor eax, eax
jmp 0x417f89
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
lea eax, [edx + ecx + 1]
push eax
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x538], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x538], 0
jne 0x417d69
xor eax, eax
jmp 0x417f89
push 0x3b
push 0x4724b8
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x417d8b
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
jmp 0x417d92
mov dword [ebp - 0x24], 0x484910
cmp dword [ebp - 8], 0
je 0x417da6
cmp dword [ebp - 0x1c], 0
je 0x417da6
lea edx, [ebp - 0x10]
mov dword [ebp - 0x28], edx
jmp 0x417dad
mov dword [ebp - 0x28], 0x484914
cmp dword [ebp - 0x1c], 0
je 0x417dbb
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
jmp 0x417dc2
mov dword [ebp - 0x2c], 0x484918
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push 0x4724bc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x538]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x538]
jmp 0x417f89
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0042dd50
add esp, 4
mov edx, dword [ebp + 8]
cmp dword [edx + 0x53c], 0
je 0x417e2b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x53c]
push ecx
call fcn.0041ac76
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx + 0x53c], 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x417e55
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x417e63
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x48491c
mov dword [ebp - 8], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3fc]
and eax, 4
test eax, eax
jne 0x417e92
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.0041708b
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x417eac
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x417eba
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x484920
cmp dword [ebp - 0x18], 0
jne 0x417ecd
cmp dword [ebp - 0x14], 0
jne 0x417ecd
xor eax, eax
jmp 0x417f89
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
lea ecx, [eax + edx + 3]
push ecx
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x53c], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x53c], 0
jne 0x417eff
xor eax, eax
jmp 0x417f89
push 0x3b
push 0x4724c4
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x417f21
mov edx, dword [ebp - 8]
mov dword [ebp - 0x30], edx
jmp 0x417f28
mov dword [ebp - 0x30], 0x484924
cmp dword [ebp - 8], 0
je 0x417f3c
cmp dword [ebp - 0x1c], 0
je 0x417f3c
lea eax, [ebp - 0x10]
mov dword [ebp - 0x34], eax
jmp 0x417f43
mov dword [ebp - 0x34], 0x484928
cmp dword [ebp - 0x1c], 0
je 0x417f51
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], ecx
jmp 0x417f58
mov dword [ebp - 0x38], 0x48492c
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
push 0x4724c8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x53c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x53c]
jmp 0x417f89
xor eax, eax
mov esp, ebp
pop ebp
ret