Function at 0x40c370
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
cmp dword [0x44bc28], 0
push ebx
push esi
push edi
mov byte [esp + 0x13], 0
jne 0x40c3bc
mov ecx, str.kernel32.dll
call fcn.0040ed20
mov dword [0x44bc28], eax
test eax, eax
je 0x40c3b0
push str.SetDefaultDllDirectories
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x44bc24], eax
jmp 0x40c3c1
mov dword [0x44bc24], 0
jmp 0x40c3cc
mov eax, dword [0x44bc24]
test eax, eax
je 0x40c3cc
push 0xc00
call eax
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 4
mov dword [0x44b49c], 3
mov dword [0x44b498], 0x16
call ebx
mov esi, eax
add esp, 4
test esi, esi
je 0x40caad
push 8
call ebx
add esp, 4
test eax, eax
je 0x40cab2
mov dword [eax], 0
mov edx, esi
mov dword [eax + 4], 0x40fbb0
xor ecx, ecx
mov dword [esi], eax
mov dword [0x44b558], esi
call fcn.00402c60
mov eax, dword [0x44b558]
lea edx, [esp + 0x20]
push 0
push 0
push 0
mov ecx, dword [eax]
mov dword [esp + 0x2c], 2
call fcn.004118c0
add esp, 0xc
mov dword [esp + 0x18], 1
lea edx, [esp + 0x18]
mov eax, dword [eax + 8]
mov dword [0x44b49c], eax
mov eax, dword [0x44b558]
push 0
push 0
push 0
mov ecx, dword [eax]
call fcn.004118c0
add esp, 0xc
mov eax, dword [eax + 8]
mov dword [0x44b498], eax
xor al, al
push str.PLINK_PROTOCOL
mov byte [esp + 0x16], al
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, dword [ebp + 8]
add esp, 4
sub edi, 1
mov dword [ebp + 8], edi
je 0x40c85e
mov eax, dword [ebp + 0xc]
nop dword [eax]
mov ebx, dword [eax + 4]
mov esi, eax
mov edx, eax
mov dword [esp + 0x18], ebx
add eax, 4
mov dword [ebp + 0xc], eax
cmp edi, 1
jle 0x40c4bb
mov edx, dword [edx + 8]
jmp 0x40c4bd
xor edx, edx
push dword [0x44b558]
mov ecx, ebx
push 1
call fcn.00403080
add esp, 8
cmp eax, 0xfffffffe
jne 0x40c4df
push ebx
push str.plink:_option___s__requires_an_argument_n
jmp 0x40c82b
cmp eax, 2
jne 0x40c4ed
dec edi
lea eax, [esi + 8]
jmp 0x40c847
cmp eax, 1
je 0x40c844
mov ecx, 0x445680
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c520
test dl, dl
je 0x40c51c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c520
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c500
xor eax, eax
jmp 0x40c525
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40c533
mov byte [esp + 0x13], 1
jmp 0x40c844
mov ecx, 0x445684
mov eax, ebx
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c560
test dl, dl
je 0x40c55c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c560
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c540
xor eax, eax
jmp 0x40c565
sbb eax, eax
or eax, 1
test eax, eax
je 0x40cabc
mov ecx, str.__version
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c594
test dl, dl
je 0x40c590
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c594
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c574
xor eax, eax
jmp 0x40c599
sbb eax, eax
or eax, 1
test eax, eax
je 0x40cabc
mov ecx, str.__help
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c5c8
test dl, dl
je 0x40c5c4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c5c8
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c5a8
xor eax, eax
jmp 0x40c5cd
sbb eax, eax
or eax, 1
test eax, eax
je 0x40caa8
mov ecx, str._pgpfp
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c600
test dl, dl
je 0x40c5fc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c600
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c5e0
xor eax, eax
jmp 0x40c605
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c97c
mov ecx, str._shareexists
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c634
test dl, dl
je 0x40c630
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c634
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c614
xor eax, eax
jmp 0x40c639
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._sanitise_stdout
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c668
test dl, dl
je 0x40c664
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c668
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c648
xor eax, eax
jmp 0x40c66d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._sanitize_stdout
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c6a0
test dl, dl
je 0x40c69c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c6a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c680
xor eax, eax
jmp 0x40c6a5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._no_sanitise_stdout
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c6d4
test dl, dl
je 0x40c6d0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c6d4
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c6b4
xor eax, eax
jmp 0x40c6d9
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._no_sanitize_stdout
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c708
test dl, dl
je 0x40c704
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c708
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c6e8
xor eax, eax
jmp 0x40c70d
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._sanitise_stderr
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c740
test dl, dl
je 0x40c73c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c740
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c720
xor eax, eax
jmp 0x40c745
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._sanitize_stderr
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c774
test dl, dl
je 0x40c770
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c774
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c754
xor eax, eax
jmp 0x40c779
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._no_sanitise_stderr
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c7a8
test dl, dl
je 0x40c7a4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c7a8
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c788
xor eax, eax
jmp 0x40c7ad
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._no_sanitize_stderr
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c7e0
test dl, dl
je 0x40c7dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c7e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c7c0
xor eax, eax
jmp 0x40c7e5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40c844
mov ecx, str._no_antispoof
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40c810
test dl, dl
je 0x40c80c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40c810
add eax, 2
add ecx, 2
test dl, dl
jne 0x40c7f0
xor eax, eax
jmp 0x40c815
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40c820
mov byte [0x44b060], al
jmp 0x40c844
cmp byte [ebx], 0x2d
jne 0x40c8a3
push ebx
push str.plink:_unknown_option___s__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00409e50
mov byte [esp + 0x1e], 1
add esp, 0xc
mov eax, dword [ebp + 0xc]
sub edi, 1
mov dword [ebp + 8], edi
jne 0x40c4a0
cmp byte [esp + 0x12], 0
jne 0x40ca9c
mov esi, dword [0x44b558]
lea edx, [esp + 0x20]
push 0
push 0
push 0
mov ecx, dword [esi]
mov dword [esp + 0x2c], 2
call fcn.004118c0
mov ecx, dword [esi]
add esp, 0xc
cmp dword [eax + 8], 5
push 0
push 0
push 0
jne 0x40c989
mov dword [esp + 0x24], 0x44
lea edx, [esp + 0x24]
jmp 0x40c995
xor cl, cl
call fcn.00410540
mov ebx, eax
test edi, edi
jle 0x40c917
mov eax, dword [esp + 0x18]
lea esi, [ebx + 0xc]
mov edi, esi
nop dword [eax]
cmp dword [ebx + 8], 0
jbe 0x40c8e0
push 1
lea eax, [esp + 0x18]
mov byte [esp + 0x18], 0x20
push eax
mov eax, dword [edi]
push edi
call eax
mov eax, dword [esp + 0x24]
add esp, 0xc
mov esi, edi
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c8e5
mov eax, dword [esi]
sub ecx, edx
push ecx
push dword [esp + 0x1c]
push esi
call eax
mov eax, dword [ebp + 8]
add esp, 0xc
dec eax
mov dword [ebp + 8], eax
test eax, eax
jle 0x40c917
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [ebp + 0xc], eax
mov eax, dword [eax]
mov dword [esp + 0x18], eax
jmp 0x40c8c0
push dword [ebx]
mov ecx, dword [0x44b558]
mov edx, 0x14
call fcn.004100a0
mov ecx, dword [0x44b558]
add esp, 4
mov edx, 0x15
push 0x436248
call fcn.004100a0
mov esi, dword [0x44b558]
add esp, 4
push 0xc
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test eax, eax
je 0x40cab7
mov edx, eax
mov dword [eax], 0x16
mov ecx, esi
mov byte [eax + 8], 1
call fcn.0040fdd0
mov ecx, ebx
call fcn.004105b0
jmp 0x40c853
call fcn.0040d910
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov dword [esp + 0x34], 0
lea edx, [esp + 0x34]
call fcn.004118c0
add esp, 0xc
mov eax, dword [eax + 8]
cmp byte [eax], 0
setne al
test al, al
je 0x40caa8
cmp byte [0x44b4b2], 0
jne 0x40c9c4
cmp byte [0x44b4b3], 0
je 0x40caa8
call fcn.00412800
mov ecx, dword [0x44b558]
mov eax, 2
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, 0x44b4c4
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], eax
xor edi, edi
cmp dword [esi], edi
jbe 0x40ca33
nop dword [eax]
mov eax, dword [esi - 4]
push ecx
push 0
mov edx, dword [eax + edi*8 + 4]
mov ecx, dword [eax + edi*8]
call fcn.00403080
mov eax, dword [esi - 4]
add esp, 8
mov eax, dword [eax + edi*8]
test eax, eax
je 0x40ca15
push eax
call ebx
add esp, 4
mov eax, dword [esi - 4]
mov eax, dword [eax + edi*8 + 4]
test eax, eax
je 0x40ca26
push eax
call ebx
add esp, 4
mov ecx, dword [esp + 0x18]
inc edi
cmp edi, dword [esi]
jb 0x40c9f0
mov eax, dword [esp + 0x20]
mov dword [esi], 0
add esi, 0xc
sub eax, 1
mov dword [esp + 0x20], eax
jne 0x40c9e7
cmp byte [esp + 0x13], 0
je 0x40ca61
mov ecx, dword [0x44b558]
mov edx, 0x36
push 1
call fcn.00410020
add esp, 4
mov ecx, dword [0x44b558]
lea edx, [esp + 0x28]
push 0
push 0
push 0
mov ecx, dword [ecx]
mov dword [esp + 0x34], 2
call fcn.004118c0
add esp, 0xc
push str.Internal_fault:_Unsupported_protocol_found_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00409e50
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0040c030
call fcn.00413280
call fcn.00413280
call fcn.00413280
call fcn.0040c340
int3