Function at 0x489440
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x29c
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x489473
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0043f920
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [0x521f38]
sub esp, 4
lea eax, [ebx + 0x38]
mov edx, dword [ebx + 0x34]
lea edi, [esp + 0x78]
mov ecx, eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x78]
call fcn.004880a0
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov ecx, dword [ebx + 0x40]
mov dword [esp], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp + 0xc], ecx
call dword [edx]
mov eax, dword [ebx + 0x34]
cmp dword [eax + 8], 1
jne 0x489550
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x2c], 2
test eax, eax
je 0x4894dc
mov eax, dword [eax + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [0x521f44]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004d1960
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [0x521f00]
sub esp, 0xc
cmp eax, 0xffffffff
mov ebp, eax
mov dword [ebx + 4], eax
jne 0x4895b0
call dword [0x5226dc]
mov dword [esp], eax
mov esi, eax
call fcn.004891e0
mov dword [ebx], eax
mov eax, dword [0x521f44]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004d1480
test esi, esi
jne 0x489560
add esp, 0x29c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x2c], 0
jmp 0x4894dc
mov edi, esi
mov edx, dword [ebx + 0x34]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x78]
call fcn.004880a0
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov dword [esp + 0x14], edi
mov ecx, dword [ebx]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebx + 0x40]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x78]
mov dword [esp + 8], ecx
call dword [edx]
add esp, 0x29c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
sub esp, 0xc
cmp byte [ebx + 0x2c], 0
je 0x489606
lea eax, [esp + 0x78]
mov dword [esp + 0x78], 1
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0xffff
mov dword [esp + 0xc], eax
mov dword [esp], ebp
call dword [0x521f04]
sub esp, 0x14
cmp byte [ebx + 0x2d], 0
je 0x489640
lea eax, [esp + 0x78]
mov dword [esp + 0x78], 1
mov dword [esp + 0x10], 4
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp + 0xc], eax
mov dword [esp], ebp
call dword [0x521f04]
sub esp, 0x14
cmp byte [ebx + 0x2e], 0
je 0x48967a
lea eax, [esp + 0x78]
mov dword [esp + 0x78], 1
mov dword [esp + 0x10], 4
mov dword [esp + 8], 8
mov dword [esp + 4], 0xffff
mov dword [esp + 0xc], eax
mov dword [esp], ebp
call dword [0x521f04]
sub esp, 0x14
mov dword [esp], str.ScpSpeedHack
call sub.msvcrt.dll_getenv
test eax, eax
je 0x48972e
mov dword [esp], str.ScpSpeedHack
mov edi, 0x502c69
call sub.msvcrt.dll_getenv
mov ecx, 4
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
test al, al
jne 0x48972e
lea eax, [esp + 0x5c]
mov dword [esp + 0x5c], 0x40000
mov dword [esp + 0x78], 0x400000
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x1001
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0xffff
mov dword [esp], ebp
call dword [0x521f04]
sub esp, 0x14
lea eax, [esp + 0x78]
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x1002
mov dword [esp + 4], 0xffff
mov dword [esp], ebp
mov dword [esp + 0xc], eax
call dword [0x521f04]
mov eax, dword [0x522674]
sub esp, 0x14
mov dword [esp + 4], str.Adapted_buffers_sizes_for_fast_SCP_transfer_speed
mov dword [esp], eax
call fcn.00435c70
cmp byte [ebx + 0x2f], 1
mov dword [esp + 0x38], ebx
sbb eax, eax
not eax
and ax, 0x3ff
movsx edi, ax
sub eax, 1
lea edx, [edi - 1]
movzx eax, ax
sub edx, eax
mov dword [esp + 0x34], edx
jmp 0x4897ca
mov eax, 2
mov dword [esp], 0
mov esi, 0x10
mov word [esp + 0x4c], ax
call dword [0x521f30]
sub esp, 4
mov dword [esp + 0x50], eax
mov dword [esp], edi
call dword [0x521f2c]
sub esp, 4
mov word [esp + 0x4e], ax
mov eax, dword [0x521f08]
lea ebx, [esp + 0x4c]
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], ebp
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x489850
call dword [0x5226dc]
cmp eax, 0x2740
mov edx, eax
jne 0x489951
xor ecx, ecx
cmp ecx, edi
je 0x489823
sub edi, 1
cmp dword [esp + 0x34], edi
je 0x489823
cmp dword [esp + 0x2c], 0x17
jne 0x489752
xor ecx, ecx
mov dword [esp + 0x5e], 0
mov dword [esp + 0x74], 0
mov edx, 0x18
xor eax, eax
mov dword [esp + eax + 0x60], ecx
add eax, 4
cmp eax, edx
jb 0x4897ea
mov eax, 0x17
mov dword [esp], edi
mov esi, 0x1c
mov word [esp + 0x5c], ax
call dword [0x521f2c]
sub esp, 4
mov word [esp + 0x5e], ax
lea ebx, [esp + 0x5c]
mov eax, dword [0x521f08]
jmp 0x48978f
mov ebx, dword [esp + 0x38]
mov edi, eax
mov esi, edx
mov dword [esp], edi
call fcn.004891e0
mov dword [ebx], eax
mov eax, dword [0x521f44]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004d1480
jmp 0x489562
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x3c], esi
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x489970
cmp dword [esp + 0x2c], 0x17
mov edx, dword [0x521f2c]
movzx ecx, word [ebx + 0x40]
je 0x489a02
mov eax, dword [eax + 0x18]
mov esi, 2
mov word [esp + 0x4c], si
mov eax, dword [eax + 4]
mov dword [esp], ecx
mov dword [esp + 0x50], eax
call edx
sub esp, 4
mov word [esp + 0x4e], ax
mov dword [esp + 4], 1
mov dword [esp], ebp
call fcn.0043f920
test eax, eax
jne 0x4899e0
mov eax, dword [esp + 0x3c]
mov dword [esp], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
call dword [0x521f0c]
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4898f4
call dword [0x5226dc]
cmp eax, 0x2733
mov esi, eax
je 0x489939
mov dword [esp], eax
call fcn.004891e0
mov dword [ebx], eax
jmp 0x48952d
mov edx, dword [ebx + 0x34]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x78]
mov byte [ebx + 0x21], 1
lea edi, [esp + 0x78]
call fcn.004880a0
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov ecx, dword [ebx + 0x40]
mov dword [esp + 8], edi
mov dword [esp + 4], 2
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call dword [edx]
mov eax, dword [0x521f44]
mov dword [esp + 4], ebx
xor esi, esi
mov dword [esp], eax
call fcn.004d1480
jmp 0x489542
test eax, eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], esi
mov edi, eax
mov esi, eax
mov ebx, dword [esp + 0x38]
je 0x48985c
jmp 0x48982b
mov ecx, dword [ebx + 0x34]
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x489982
mov edx, dword [ebx + 0x3c]
cmp edx, dword [ecx + 0x14]
jl 0x4899a7
mov dword [esp + 8], 0x409
mov dword [esp + 4], str._MoTTY_windows_network.c
mov dword [esp], str.sock__addr__addresses__sock__step.curraddr___sock__addr__naddresses
call fcn.004d8b40
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx + 0x3c]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + edx*4]
mov ecx, 2
mov word [esp + 0x4c], cx
mov dword [esp], eax
call dword [0x521f30]
sub esp, 4
mov dword [esp + 0x50], eax
movzx eax, word [ebx + 0x40]
mov dword [esp], eax
call dword [0x521f2c]
sub esp, 4
mov word [esp + 0x4e], ax
jmp 0x48989d
mov dword [ebx], eax
mov eax, dword [0x521f44]
mov edi, 1
mov dword [esp + 4], ebx
mov esi, 1
mov dword [esp], eax
call fcn.004d1480
jmp 0x489562
mov edi, 0x17
mov dword [esp], ecx
mov word [esp + 0x5c], di
call edx
sub esp, 4
mov word [esp + 0x5e], ax
mov eax, dword [ebx + 0x38]
mov eax, dword [eax + 0x18]
mov edx, dword [eax + 8]
mov dword [esp + 0x64], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x68], edx
mov edx, dword [eax + 0x10]
mov dword [esp + 0x6c], edx
mov edx, dword [eax + 0x14]
mov dword [esp + 0x70], edx
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x60], edx
mov dword [esp + 0x74], eax
jmp 0x48989d