Function at 0x4b6bd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x5c1334]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
mov dword [ebp - 0x138], ecx
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x134], eax
mov eax, dword [eax]
mov dword [ebp - 0x11c], esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x118], 1
push edi
test eax, eax
je 0x4b6c1f
cmp byte [eax], 0
mov dword [ebp - 0x128], 1
jne 0x4b6c29
mov dword [ebp - 0x128], 0
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x124], ebx
mov byte [ebp - 0x111], bl
mov byte [ebp - 0x112], bl
mov dword [ebp - 0x12c], ebx
test esi, esi
jne 0x4b6cce
push str.HOME
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
mov byte [ebp - 0x110], bl
test eax, eax
je 0x4b6dc4
push 0x104
lea ecx, [ebp - 0x110]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x110], bl
je 0x4b6dc4
lea eax, [ebp - 0x110]
push eax
call dword [0x5c1c80]
mov edi, eax
add esp, 4
test edi, edi
je 0x4b6dc4
push str._netrc
push 0x5950cc
push edi
push str._s_s_s
call fcn.004a4250
push edi
mov esi, eax
call dword [0x5c1c7c]
add esp, 0x14
test esi, esi
je 0x4b6dc4
lea edi, [ebx + 1]
push 0x597e24
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov ecx, eax
mov dword [ebp - 0x130], ecx
test edi, edi
je 0x4b6cfd
test esi, esi
je 0x4b6cfd
push esi
call dword [0x5c1c7c]
mov ecx, dword [ebp - 0x130]
add esp, 4
test ecx, ecx
je 0x4b6fa3
nop word [eax + eax]
push ecx
lea eax, [ebp - 0x110]
push 0x100
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4b6f94
lea eax, [ebp - 0x120]
mov edx, 0x59dc0c
push eax
lea ecx, [ebp - 0x110]
call fcn.004c9330
mov edi, dword [ebp - 0x120]
add esp, 4
mov esi, eax
test esi, esi
je 0x4b6f7f
mov eax, dword [ebp - 0x134]
mov edx, dword [ebp - 0x11c]
mov ecx, dword [eax]
test ecx, ecx
je 0x4b6d7e
cmp byte [ecx], 0
je 0x4b6d7e
mov eax, dword [edx]
test eax, eax
je 0x4b6d7e
cmp byte [eax], 0
jne 0x4b6f94
mov eax, ebx
sub eax, 0
je 0x4b6ecd
sub eax, 1
je 0x4b6ea4
sub eax, 1
jne 0x4b6ee9
cmp byte [ebp - 0x111], al
je 0x4b6e05
cmp dword [ebp - 0x128], eax
je 0x4b6dd8
mov edx, esi
call fcn.004c2eb0
mov dword [ebp - 0x12c], eax
mov byte [ebp - 0x111], 0
jmp 0x4b6ee9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00528802
mov esp, ebp
pop ebp
ret
push ecx
call dword [0x5c1c7c]
push esi
call dword [0x5c1c80]
mov ecx, dword [ebp - 0x134]
add esp, 8
mov dword [ecx], eax
test eax, eax
je 0x4b6f8a
mov byte [ebp - 0x111], 0
jmp 0x4b6ee9
cmp byte [ebp - 0x112], 0
je 0x4b6e4e
cmp dword [ebp - 0x12c], 0
jne 0x4b6e20
cmp dword [ebp - 0x128], 0
jne 0x4b6e42
push dword [edx]
call dword [0x5c1c7c]
push esi
call dword [0x5c1c80]
mov esi, dword [ebp - 0x11c]
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x4b6f8a
mov byte [ebp - 0x112], 0
jmp 0x4b6ee9
mov edx, esi
mov ecx, str.login
call fcn.004c2eb0
test eax, eax
je 0x4b6e6a
mov byte [ebp - 0x111], 1
jmp 0x4b6ee9
mov edx, esi
mov ecx, str.password
call fcn.004c2eb0
test eax, eax
je 0x4b6e83
mov byte [ebp - 0x112], 1
jmp 0x4b6ee9
mov edx, esi
mov ecx, str.machine
call fcn.004c2eb0
test eax, eax
je 0x4b6ee9
mov ebx, 1
mov dword [ebp - 0x12c], 0
jmp 0x4b6ee3
mov ecx, dword [ebp - 0x138]
mov edx, esi
call fcn.004c2eb0
xor ecx, ecx
mov ebx, eax
test ebx, ebx
cmove ecx, dword [ebp - 0x118]
neg ebx
mov dword [ebp - 0x118], ecx
sbb ebx, ebx
and ebx, 2
jmp 0x4b6ee3
mov edx, esi
mov ecx, str.machine
call fcn.004c2eb0
test eax, eax
mov eax, 1
cmovne ebx, eax
mov dword [ebp - 0x124], ebx
mov al, byte [edi]
mov esi, edi
test al, al
je 0x4b6f16
movsx eax, al
push eax
push 0x59dc0c
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
je 0x4b6f16
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4b6ef1
xor esi, esi
jmp 0x4b6d50
cmp byte [esi], 0
je 0x4b6f0f
mov al, byte [esi + 1]
lea edi, [esi + 1]
mov dword [ebp - 0x120], edi
test al, al
je 0x4b6f74
mov ebx, edi
nop dword [eax]
movsx eax, al
push eax
push 0x59dc0c
call dword [sym.imp.VCRUNTIME140.dll_strchr]
add esp, 8
test eax, eax
jne 0x4b6f63
mov al, byte [ebx + 1]
lea edi, [ebx + 1]
mov dword [ebp - 0x120], edi
mov ebx, edi
test al, al
jne 0x4b6f30
mov ebx, dword [ebp - 0x124]
jmp 0x4b6d50
cmp byte [edi], 0
je 0x4b6f74
mov byte [edi], 0
lea edi, [ebx + 1]
mov dword [ebp - 0x120], edi
mov ebx, dword [ebp - 0x124]
jmp 0x4b6d50
mov ecx, dword [ebp - 0x130]
jmp 0x4b6d10
mov dword [ebp - 0x118], 0xffffffff
push dword [ebp - 0x130]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x118]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00528802
mov esp, ebp
pop ebp
ret