Function at 0x4677b2
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 [0x4daa40]
cmp ecx, edx
jne 0x4677f5
push 0x4daa50
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x4677f5
mov dword [ebp - 0xc], 1
jmp 0x46785a
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
cmp eax, 0xe
jb 0x467853
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 [0x4daa60]
cmp edx, eax
jne 0x467853
push 0x4daa70
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 0x467853
mov dword [ebp - 0xc], 2
jmp 0x46785a
mov dword [ebp - 0xc], 3
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 1
je 0x46790a
cmp dword [ebp - 0x20], 2
je 0x467a7d
cmp dword [ebp - 0x20], 3
je 0x46787f
jmp 0x467c10
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 0x46789d
mov eax, dword [ebp - 4]
jmp 0x467c12
push str.LM_BORROW
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x4678ea
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.00467258
add esp, 0x14
cmp dword [ebp - 4], 0
jne 0x4678e8
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.00467258
add esp, 0x14
jmp 0x467902
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.00467258
add esp, 0x14
mov eax, dword [ebp - 4]
jmp 0x467c12
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x534], 0
je 0x467935
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x534]
push eax
call fcn.00465d6b
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x534], 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 0x46795f
mov eax, dword [ebp - 0x1c]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x46796d
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x4e27b8
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.00467258
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x46799f
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x4679ad
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x4e27bc
cmp dword [ebp - 0x18], 0
jne 0x4679c0
cmp dword [ebp - 0x14], 0
jne 0x4679c0
xor eax, eax
jmp 0x467c12
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 + 0x534], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x534], 0
jne 0x4679f2
xor eax, eax
jmp 0x467c12
push 0x3b
push 0x4daa8c
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x467a14
mov edx, dword [ebp - 8]
mov dword [ebp - 0x24], edx
jmp 0x467a1b
mov dword [ebp - 0x24], 0x4e27c0
cmp dword [ebp - 8], 0
je 0x467a2f
cmp dword [ebp - 0x1c], 0
je 0x467a2f
lea eax, [ebp - 0x10]
mov dword [ebp - 0x28], eax
jmp 0x467a36
mov dword [ebp - 0x28], 0x4e27c4
cmp dword [ebp - 0x1c], 0
je 0x467a44
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], ecx
jmp 0x467a4b
mov dword [ebp - 0x2c], 0x4e27c8
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push 0x4daa90
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x534]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x534]
jmp 0x467c12
mov edx, dword [ebp + 0xc]
push edx
call fcn.004799a0
add esp, 4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x538], 0
je 0x467ab4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x538]
push edx
call fcn.00465d6b
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 0x467ade
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x467aec
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0x4e27cc
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3fc]
and ecx, 4
test ecx, ecx
jne 0x467b1b
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.00467258
add esp, 0x14
cmp dword [ebp - 8], 0
je 0x467b35
mov edx, dword [ebp - 8]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x467b43
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0x4e27d0
cmp dword [ebp - 0x18], 0
jne 0x467b56
cmp dword [ebp - 0x14], 0
jne 0x467b56
xor eax, eax
jmp 0x467c12
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 + 0x538], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x538], 0
jne 0x467b88
xor eax, eax
jmp 0x467c12
push 0x3b
push 0x4daa98
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 8], 0
je 0x467baa
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x30], ecx
jmp 0x467bb1
mov dword [ebp - 0x30], 0x4e27d4
cmp dword [ebp - 8], 0
je 0x467bc5
cmp dword [ebp - 0x1c], 0
je 0x467bc5
lea edx, [ebp - 0x10]
mov dword [ebp - 0x34], edx
jmp 0x467bcc
mov dword [ebp - 0x34], 0x4e27d8
cmp dword [ebp - 0x1c], 0
je 0x467bda
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
jmp 0x467be1
mov dword [ebp - 0x38], 0x4e27dc
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
push eax
push 0x4daa9c
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 0x467c12
xor eax, eax
mov esp, ebp
pop ebp
ret