Function at 0x401360
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x436924]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x124], 0
mov byte [ebp - 0x11d], 0
push str.INNETSCAPE
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x4013b3
mov dword [0x436950], 1
push str.NSWIN
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [0x43694c], eax
push 0x2800
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [0x436954], eax
cmp dword [0x436954], 0
jne 0x4013e8
push str.pathp_malloc_failed
push 0x42f028
push 0x4d
push 0x42f030
call fcn.00401c80
add esp, 0x10
push 0x1000
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [0x436944], eax
cmp dword [0x436944], 0
jne 0x40141d
push str.cmdp_malloc_failed
push 0x42f050
push 0x4f
push 0x42f058
call fcn.00401c80
add esp, 0x10
push str.PATH
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [0x43f0a0], eax
push 0x104
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [0x43efec]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x110]
mov dword [ebp + 8], edx
push 0x5c
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR90.dll_strrchr]
add esp, 8
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0
jne 0x401479
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x11c], ecx
mov edx, dword [ebp - 0x11c]
mov byte [edx], 0
push 0x2800
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [0x43f100], eax
cmp dword [0x43f100], 0
jne 0x4014b7
push str.leftypath_malloc_failed
push str.init
push 0x60
push str..common.c
call fcn.00401c80
add esp, 0x10
mov eax, dword [0x43f100]
mov byte [eax], 0
push str.LEFTYPATH
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0
je 0x401505
mov ecx, dword [ebp - 0x11c]
push ecx
mov edx, dword [0x43f100]
push edx
call sub.MSVCR90.dll_strcat
add esp, 8
push 0x42f0a4
mov eax, dword [0x43f100]
push eax
call sub.MSVCR90.dll_strcat
add esp, 8
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
je 0x401536
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [0x43f100]
push ecx
call sub.MSVCR90.dll_strcat
add esp, 8
push 0x42f0a8
mov edx, dword [0x43f100]
push edx
call sub.MSVCR90.dll_strcat
add esp, 8
mov dword [ebp - 0x114], 0
jmp 0x401551
mov eax, dword [ebp - 0x114]
add eax, 1
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 2
jge 0x40165d
cmp dword [ebp - 0x114], 0
jne 0x401572
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x11c], ecx
jmp 0x40157e
mov edx, dword [0x43f0a0]
mov dword [ebp - 0x11c], edx
cmp dword [ebp - 0x11c], 0
je 0x401637
push 0x3b
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
je 0x4015c3
mov ecx, dword [ebp - 0x118]
mov dl, byte [ecx]
mov byte [ebp - 0x11d], dl
mov eax, dword [ebp - 0x118]
mov byte [eax], 0
mov ecx, dword [ebp - 0x11c]
push ecx
mov edx, dword [0x43f100]
push edx
call sub.MSVCR90.dll_strcat
add esp, 8
push str...liblefty
mov eax, dword [0x43f100]
push eax
call sub.MSVCR90.dll_strcat
add esp, 8
cmp dword [ebp - 0x118], 0
je 0x401628
mov ecx, dword [ebp - 0x118]
mov dl, byte [ebp - 0x11d]
mov byte [ecx], dl
mov eax, dword [ebp - 0x118]
add eax, 1
mov dword [ebp - 0x11c], eax
push 0x42f0bc
mov ecx, dword [0x43f100]
push ecx
call sub.MSVCR90.dll_strcat
add esp, 8
jmp 0x401632
mov dword [ebp - 0x11c], 0
jmp 0x40157e
mov edx, dword [0x43f100]
movsx eax, byte [edx]
test eax, eax
je 0x401658
push 0x42f0c0
mov ecx, dword [0x43f100]
push ecx
call sub.MSVCR90.dll_strcat
add esp, 8
jmp 0x401542
cmp dword [ebp - 0x124], 0
je 0x40168f
mov edx, dword [ebp - 0x124]
push edx
mov eax, dword [0x43f100]
push eax
call sub.MSVCR90.dll_strcat
add esp, 8
push 0x42f0c4
mov ecx, dword [0x43f100]
push ecx
call sub.MSVCR90.dll_strcat
add esp, 8
push 0x42f0c8
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [0x43f0a8], eax
cmp dword [0x43f0a8], 0
jne 0x4016b5
mov dword [0x43f0a8], 0x436958
push str.LEFTYWINSYSmswin
call dword [sym.imp.MSVCR90.dll__putenv]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042b913
mov esp, ebp
pop ebp
ret