Function at 0x488d60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x4a8b70]
xor eax, ebp
mov dword [ebp - 0xc], eax
cmp dword [ebp + 8], 0
jne 0x488d82
lea eax, [ebp - 0x410]
mov dword [ebp + 8], eax
cmp dword [ebp + 0xc], 0
jne 0x488dd8
cmp dword [0x4b804c], 0
je 0x488da1
mov ecx, dword [0x4b804c]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
cmp dword [ebp + 0x10], 0
je 0x488dbc
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [ebp - 0x414], eax
jmp 0x488dc6
mov dword [ebp - 0x414], 0
mov eax, dword [ebp - 0x414]
mov dword [0x4b804c], eax
xor eax, eax
jmp 0x489216
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCR90.dll_strlen
add esp, 4
cmp eax, 0x400
jae 0x488e45
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.MSVCR90.dll_strcpy
add esp, 8
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00489730
add esp, 8
test eax, eax
je 0x488e45
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x410]
cmp eax, ecx
jne 0x488e31
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [ebp - 0x418], eax
jmp 0x488e3a
mov eax, dword [ebp + 8]
mov dword [ebp - 0x418], eax
mov eax, dword [ebp - 0x418]
jmp 0x489216
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0x2f
jne 0x488e5c
mov dword [ebp + 0x10], 0
jmp 0x489141
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x489141
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], ecx
push 0x2f
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x488e94
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov dword [ebp + 0xc], 0x4b35f8
jmp 0x488e9b
mov dword [ebp + 0x10], 0
cmp dword [0x4b804c], 0
je 0x488eb5
mov ecx, dword [0x4b804c]
movsx edx, byte [ecx]
test edx, edx
je 0x489141
push 0x2f
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
jne 0x489032
mov ecx, dword [0x4b804c]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x488ef5
cmp dword [0x4b8e5c], 0
je 0x488f31
mov edx, dword [0x4b8e5c]
mov eax, dword [edx]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x488f31
push 0x2f
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x488f31
push 0xa
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
jne 0x488f31
push 0
mov eax, dword [ebp - 8]
push eax
call sub.MSVCR90.dll__access
add esp, 8
test eax, eax
je 0x489032
mov ecx, dword [sym.imp.MSVCR90.dll__environ]
cmp dword [ecx], 0
je 0x488fe4
mov edx, dword [sym.imp.MSVCR90.dll__environ]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x488fe4
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp eax, 0x5f
jne 0x488fe4
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp eax, 0x3d
jne 0x488fe4
push 0x2f
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x488fe4
mov eax, dword [ebp - 8]
movsx ecx, byte [eax]
movsx edx, byte [0x4b35fc]
cmp ecx, edx
jne 0x488fbb
push 5
push str._bin_
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x488fe4
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx]
movsx eax, byte [0x4b360c]
cmp edx, eax
jne 0x489032
push 9
push str._usr_bin_
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x489032
mov edx, dword [ebp - 4]
movsx eax, byte [edx]
test eax, eax
je 0x489141
push 0
mov ecx, dword [ebp - 4]
push ecx
call sub.MSVCR90.dll__access
add esp, 8
test eax, eax
jne 0x489141
push 0x4b3624
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x489141
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
cmp eax, 0x2f
jne 0x489141
cmp dword [0x4b804c], 0
jne 0x48904d
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [0x4b804c], eax
mov edx, dword [ebp - 8]
push edx
call sub.MSVCR90.dll_strlen
add esp, 4
cmp eax, 0x3fa
jae 0x489141
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004896e0
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
cmp edx, dword [ebp + 8]
ja 0x489084
jmp 0x489141
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x489077
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
ja 0x4890a5
jmp 0x489141
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
cmp eax, 0x2f
jne 0x489098
push 0x4b3628
mov ecx, dword [ebp - 8]
add ecx, 1
push ecx
call sub.MSVCR90.dll_strcpy
add esp, 8
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.00489730
add esp, 8
test eax, eax
je 0x48913c
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00489580
add esp, 0x14
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x48913a
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x410]
cmp edx, eax
jne 0x489126
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [ebp - 0x41c], eax
jmp 0x48912f
mov edx, dword [ebp - 8]
mov dword [ebp - 0x41c], edx
mov eax, dword [ebp - 0x41c]
jmp 0x489216
jmp 0x489141
jmp 0x489077
cmp dword [ebp + 0x10], 0
jne 0x489166
push 0x2f
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x489166
mov dword [ebp - 0x420], 0x4b8050
jmp 0x489171
call fcn.00489530
mov dword [ebp - 0x420], eax
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00489580
add esp, 0x14
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4891df
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
test edx, edx
jne 0x4891df
push str.FPATH
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4891df
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00489580
add esp, 0x14
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x489207
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x410]
cmp edx, eax
jne 0x489207
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [ebp - 0x424], eax
jmp 0x489210
mov edx, dword [ebp - 8]
mov dword [ebp - 0x424], edx
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.0044283e
mov esp, ebp
pop ebp
ret