Function at 0x4a0380
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
lea ecx, [ebp - 0x1c]
push ebx
push esi
push edi
push 0
call fcn.0049d3f0
mov edi, dword [ebp + 0x10]
mov ecx, edi
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a03a0
sub ecx, edx
sar ecx, 1
push 2
lea ebx, [ecx + 1]
push ebx
mov dword [ebp - 0xc], ebx
call fcn.004accc4
add esp, 8
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a03e2
mov eax, dword [ebp + 8]
xor ecx, ecx
xor esi, esi
mov word [eax], cx
lea ecx, [ebp - 0x1c]
call fcn.0049d420
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push ebx
push eax
mov esi, 1
call fcn.004a6546
push ebx
push dword [ebp - 8]
call fcn.004a684b
mov ebx, dword [ebp + 0x14]
add esp, 0x14
test ebx, ebx
je 0x4a06b4
mov ecx, ebx
lea edx, [ecx + 2]
jmp 0x4a0410
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a0410
sub ecx, edx
sar ecx, 1
je 0x4a06b4
push ebx
push edi
call fcn.004a6d58
add esp, 8
test eax, eax
je 0x4a06b4
push str.http:__
push dword [ebp - 8]
call fcn.004a6d58
add esp, 8
test eax, eax
jne 0x4a06b4
push str.https:__
push dword [ebp - 8]
call fcn.004a6d58
add esp, 8
test eax, eax
jne 0x4a06b4
push str.ftp:__
push dword [ebp - 8]
call fcn.004a6d58
add esp, 8
test eax, eax
jne 0x4a06b4
push edi
push dword [ebp - 0xc]
mov edi, dword [ebp - 8]
push edi
call fcn.004a6546
push ebx
push edi
mov dword [ebp - 4], edi
call fcn.004a6d58
mov ebx, dword [ebp + 8]
xor ecx, ecx
mov edi, dword [ebp + 0xc]
add esp, 0x14
mov dword [ebp - 0xc], eax
mov word [ebx], cx
test eax, eax
je 0x4a065e
nop
push dword [ebp - 4]
xor ecx, ecx
push edi
push ebx
mov word [eax], cx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a0679
mov edx, dword [ebp + 0x14]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 4], eax
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a04e0
sub ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
sar ecx, 1
push edx
lea eax, [eax + ecx*2]
push eax
mov dword [ebp - 4], eax
call fcn.004a6d58
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4a0699
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov word [ebp - 0x224], ax
lea eax, [ebp - 0x224]
push 0x104
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edi, [eax + 1]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 1
jne 0x4a059c
cmp eax, 0xcb
jne 0x4a059c
push dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a0679
push dword [ebp - 4]
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a0679
push dword [ebp + 0x14]
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a0679
jmp 0x4a061f
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a05a1
sub ecx, edx
lea eax, [edi + 1]
sar ecx, 1
add eax, ecx
cmp eax, dword [ebp + 0xc]
ja 0x4a0695
cmp edi, 1
jbe 0x4a061c
cmp edi, 0x104
ja 0x4a05e1
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x224]
push eax
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
jmp 0x4a061f
push 2
push edi
call fcn.004accc4
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4a0695
push edi
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [ebp + 0xc]
push ebx
push edi
push dword [ebp + 8]
call fcn.004a69d5
push ebx
call fcn.004a8ef0
mov ebx, dword [ebp + 8]
add esp, 0x10
jmp 0x4a061f
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0xc], eax
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a0630
sub ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
sar ecx, 1
push edx
lea eax, [eax + ecx*2]
push eax
mov dword [ebp - 4], eax
call fcn.004a6d58
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4a04b0
mov eax, dword [ebp - 4]
cmp word [eax], 0
je 0x4a0679
push eax
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
push dword [ebp - 8]
call fcn.004a8ef0
add esp, 4
lea ecx, [ebp - 0x1c]
call fcn.0049d420
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
jmp 0x4a0679
push dword [ebp + 0x14]
push edi
push ebx
call fcn.004a69d5
add esp, 0xc
mov esi, eax
neg esi
sbb esi, esi
inc esi
je 0x4a0679
push dword [ebp - 4]
jmp 0x4a0668
push dword [ebp - 8]
call fcn.004a8ef0
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004a6546
add esp, 0x10
lea ecx, [ebp - 0x1c]
mov esi, eax
neg esi
sbb esi, esi
inc esi
call fcn.0049d420
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret