Function at 0x140040fe0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4d0]
sub rsp, 0x5d0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x628], rbx
mov rax, qword [0x1401b5030]
xor rax, rsp
mov qword [rbp + 0x4c0], rax
mov edi, r8d
mov r15d, edx
mov dword [rsp + 0x44], edx
mov rbx, rcx
cmp byte [rcx + 0x73], 0
je 0x140041895
mov word [rsp + 0x78], 0x407
xor r12d, r12d
mov qword [rsp + 0x7c], r12
lea eax, [rdi + 1]
mov esi, eax
mov ecx, eax
call fcn.14011b4c0
mov r14, rax
test rax, rax
je 0x140041895
mov r8d, esi
xor edx, edx
mov rcx, rax
call fcn.14011fff0
mov r8d, edi
mov rdx, r14
mov rcx, qword [rbx + 0x38]
call fcn.140025ac0
cmp edi, 0x104
jbe 0x140041088
mov byte [r14 + 0x104], r12b
jmp 0x14004108c
mov byte [rdi + r14], r12b
mov eax, dword [rbx + 0xb54]
cmp eax, 1
je 0x1400410e3
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0x38]
call fcn.140025ac0
mov ecx, dword [rsp + 0x40]
mov r12d, ecx
and r12d, 0xff0000
mov eax, ecx
shr eax, 0x10
or r12d, eax
shr r12d, 8
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or r12d, eax
mov eax, dword [rbx + 0xb54]
cmp eax, 1
jne 0x140041128
cmp r15d, 0xffffffff
je 0x140041133
lea rsi, [rbx + 0x9f1]
mov r9d, 0x124
mov r8, rsi
mov edx, 0x40f
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.USER32.dll_GetDlgItemTextA]
mov edx, 0x2c
mov rcx, r14
call fcn.14012bfe8
mov rdi, rax
lea rcx, [rbx + 0xb3f]
test rax, rax
jne 0x14004117f
mov byte [rcx], al
jmp 0x140041190
cmp r15d, 0xffffffff
jne 0x1400410e9
cmp r12d, r15d
jne 0x1400410e9
lea rax, [0x1402be090]
mov qword [rsp + 0x20], rax
mov r9, r14
lea r8, [0x1402bdf90]
lea rdx, str.__s____s____s
lea rcx, [rbp + 0x180]
call fcn.140047d60
lea rdx, [rbp + 0x180]
mov rcx, rbx
call fcn.140040bf0
mov rcx, r14
call fcn.14011b120
mov byte [rbx + 0xb3e], 1
jmp 0x140041895
lea r8, [rax + 1]
mov edx, reloc.WS2_32.dll_select
call fcn.14012209c
mov byte [rdi], 0
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov r9, rax
mov r8, rsi
lea rdx, [0x140198ad8]
lea rcx, [rbp + 0x390]
call fcn.140047dc0
xor r13b, r13b
xor eax, eax
mov qword [rsp + 0x50], rax
mov rdi, 0xffffffffffffffff
mov rcx, rdi
inc rcx
cmp byte [rsi + rcx], al
jne 0x1400411c6
inc rcx
call fcn.14011b4c0
mov r15, rax
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rsi + r8], r13b
jne 0x1400411e0
inc r8
xor edx, edx
mov rcx, r15
call fcn.14011fff0
mov rdx, rdi
nop dword [rax]
inc rdx
cmp byte [rsi + rdx], r13b
jne 0x140041200
inc rdx
mov r8, rsi
mov rcx, r15
call fcn.14012209c
mov edx, 0x5c
mov rcx, r15
call fcn.14012bfe8
mov byte [rax], r13b
lea r8, [rbx + 0xb8a]
mov rax, r14
sub r8, r14
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140041247
inc rax
test ecx, ecx
jne 0x140041234
test edx, edx
jne 0x140041895
cmp byte [r15 + 1], 0x3a
jne 0x14004125a
mov byte [r15 + 3], r13b
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.GetDiskFreeSpaceExA
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14004129f
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x50]
mov rcx, r15
call rax
movzx r13d, r13b
test eax, eax
mov eax, 1
cmove r13d, eax
mov rcx, r15
call fcn.14011b120
mov rcx, qword [rsp + 0x50]
sar rcx, 0xa
mov eax, 0x10624dd3
mul dword [rsp + 0x44]
shr edx, 6
movzx r15d, r13b
cmp ecx, edx
mov r13d, 1
cmovb r15d, r13d
lea edx, [r13 + 0x5b]
mov rcx, r14
call fcn.14012bfe8
test rax, rax
je 0x140041818
cmp byte [rax + 1], 0
je 0x140041818
test r15b, r15b
je 0x140041316
lea r9, [rbp + 0x390]
lea r8, [0x1402bd310]
lea rdx, str.__s____s__
lea rcx, [rbp + 0x180]
call fcn.140047d60
jmp 0x140041845
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov r15, rax
mov edx, 0x5c
mov rcx, rax
call fcn.14012bfe8
test rax, rax
je 0x140041339
inc rax
jmp 0x14004133c
mov rax, r15
mov r8d, 9
lea rdx, str._UVNCDIR_
mov rcx, rax
call fcn.14012b3c0
xorps xmm0, xmm0
movdqa xmm1, xmmword [0x14019eca0]
test eax, eax
jne 0x14004138b
movdqu xmmword [rbp - 0x58], xmm0
movdqu xmmword [rbp - 0x58], xmm1
mov byte [rbp - 0x68], al
nop dword [rax]
inc rdi
cmp byte [r15 + rdi], 0
jne 0x140041370
mov r8, rdi
mov rdx, r15
lea rcx, [rbp - 0x68]
call fcn.14002d450
jmp 0x1400413fc
movdqu xmmword [rbp - 0x38], xmm0
movdqu xmmword [rbp - 0x38], xmm1
mov byte [rbp - 0x48], 0
mov r8d, 9
lea rdx, str._UVNCPFT_
lea rcx, [rbp - 0x48]
call fcn.14002d450
nop
inc rdi
cmp byte [r15 + rdi], 0
jne 0x1400413b0
mov r8, rdi
mov rdx, r15
lea rcx, [rbp - 0x48]
call fcn.140047be0
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
movups xmm0, xmmword [rbp - 0x48]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rbp - 0x38]
movups xmmword [rbp - 0x58], xmm1
movdqa xmm0, xmmword [0x14019eca0]
movdqu xmmword [rbp - 0x38], xmm0
mov byte [rbp - 0x48], 0
lea rcx, [rbp - 0x48]
call fcn.14002d3f0
nop
lea r8, [rbp - 0x68]
cmp qword [rbp - 0x50], 0x10
cmovae r8, qword [rbp - 0x68]
mov edx, 0x124
mov rcx, rsi
call fcn.1401220fc
nop
lea rcx, [rbp - 0x68]
call fcn.14002d3f0
nop
mov edx, r12d
shl rdx, 0x20
mov eax, dword [rsp + 0x44]
add rdx, rax
mov qword [rbx + 0x600], rdx
mov r9d, WSAAsyncSelect
lea r8, [rbp + 0x120]
call fcn.14003f050
lea rax, [rbp + 0x120]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x390]
lea r8, [0x1402bda10]
lea rdx, [0x140198b38]
lea rcx, [rbp + 0x180]
call fcn.140047d60
lea rdx, [rbp + 0x180]
mov rcx, rbx
call fcn.140040bf0
mov rdi, qword [rbx + 0x40]
xor r15d, r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov edx, 0x40a
lea r8d, [rdx - 8]
mov rcx, rdi
call qword [sym.imp.USER32.dll_SendDlgItemMessageA]
movzx eax, word [rbx + 0xb58]
shl rax, 0x10
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov edx, 0x40a
lea r8d, [rdx - 9]
mov rcx, rdi
call qword [sym.imp.USER32.dll_SendDlgItemMessageA]
xor r8d, r8d
mov rdx, qword [rbx + 0x40]
mov rcx, rbx
call fcn.140040a90
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.USER32.dll_UpdateWindow]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r15 + 3]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0xb18], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
sete dil
cmp qword [rbx + 0xb18], 0xffffffffffffffff
jne 0x1400415c2
lea rax, [0x1402bca90]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x390]
lea r8, [0x1402bdf90]
lea rdx, str.__s____s____s
lea rcx, [rbp + 0x180]
call fcn.140047d60
lea rdx, [rbp + 0x180]
mov rcx, rbx
call fcn.140040bf0
mov rcx, qword [rbx + 0xb18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call fcn.14011b120
mov byte [rbx + 0xb3e], 1
mov dword [rsp + 0x7c], 0xffffffff
mov rcx, qword [rbx + 0x38]
lea r8d, [r15 + 0xc]
lea rdx, [rsp + 0x78]
cmp dword [rbx + 0xb54], 1
jne 0x1400415b5
xor r9d, r9d
call fcn.140026600
jmp 0x140041895
mov r9b, 7
call fcn.1400261c0
jmp 0x140041895
mov rcx, r14
call fcn.14011b120
mov edx, dword [rbx + 0xb58]
add edx, 0x400
mov rcx, qword [rbx + 0x38]
call fcn.140026c00
test dil, dil
je 0x140041776
cmp dword [rbx + 0xb54], 1
je 0x140041776
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
lea rdx, [rbp - 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp rdi, 0xffffffffffffffff
je 0x140041776
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [rbp - 4]
shl rax, 0x20
mov ecx, dword [rbp]
add rax, rcx
mov ecx, dword [rbx + 0xb58]
xor edx, edx
div rcx
lea ecx, [rax*4 + 0x400]
mov dword [rsp + 0x48], ecx
call fcn.14011b4c0
mov rdi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140041776
mov r13, qword [rbx + 0xb18]
xor r12b, r12b
mov dword [rsp + 0x40], r15d
mov esi, r15d
mov ecx, dword [rbx + 0xb58]
call fcn.14011b4c0
mov r15, rax
test rax, rax
je 0x140041773
mov r14, rdi
nop
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, dword [rbx + 0xb58]
mov rdx, r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [rsp + 0x40]
test eax, eax
jne 0x1400416c2
test edi, edi
je 0x1400416c6
mov r12b, 1
jmp 0x1400416c6
test edi, edi
je 0x1400416eb
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call sym.AmazonVNCViewer.exe_adler32_z
mov r8d, edi
mov rdx, r15
mov ecx, eax
call sym.AmazonVNCViewer.exe_adler32_z
mov dword [r14], eax
add esi, 4
add r14, 4
jmp 0x140041690
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, r15
call fcn.14011b120
test r12b, r12b
jne 0x140041773
cmp esi, 0xffffffff
je 0x140041773
mov word [rbp - 0x78], 0xc07
mov eax, dword [rsp + 0x48]
bswap eax
mov dword [rbp - 0x74], eax
mov ecx, esi
shl ecx, 0x10
mov eax, esi
and eax, 0xff00
or ecx, eax
shl ecx, 8
mov eax, esi
sar eax, 8
and eax, 0xff00
or ecx, eax
mov eax, esi
shr eax, 0x18
or ecx, eax
mov dword [rbp - 0x70], ecx
mov byte [rsp + 0x20], 1
mov r9b, 7
mov r8d, InitCommonControls
lea rdx, [rbp - 0x78]
mov rcx, qword [rbx + 0x38]
call fcn.140026140
mov r9b, 1
mov r8d, esi
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rbx + 0x38]
call fcn.140026600
xor r15d, r15d
mov eax, dword [rsp + 0x44]
bswap eax
mov dword [rsp + 0x7c], eax
mov rcx, qword [rbx + 0x38]
mov r8d, InitCommonControls
lea rdx, [rsp + 0x78]
cmp dword [rbx + 0xb54], 1
jne 0x1400417a2
xor r9d, r9d
call fcn.140026600
jmp 0x1400417aa
mov r9b, 7
call fcn.1400261c0
mov qword [rbx + 0xb20], 0
mov qword [rbx + 0xb28], r15
mov qword [rbx + 0xb30], r15
mov dword [rbx + 0xb38], r15d
mov word [rbx + 0xb3c], 0x101
mov byte [rbx + 0xb3e], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rbx + 0x610], eax
cmp dword [rbx + 0xb54], 1
jne 0x140041814
mov rax, qword [rbx + 0x38]
cmp byte [rax + 0x4d60], 0
je 0x140041814
cmp byte [rax + 0x4d61], 0
jne 0x140041814
mov dword [rax + 0x4d54], r15d
mov rcx, rbx
call fcn.14003dd80
mov al, 1
jmp 0x140041897
lea rax, [0x1402be090]
mov qword [rsp + 0x20], rax
lea r9, str.Invalid_remote_file_name
lea r8, [0x1402bd310]
lea rdx, str.__s____s____s
lea rcx, [rbp + 0x180]
call fcn.140047d60
lea rdx, [rbp + 0x180]
mov rcx, rbx
call fcn.140040bf0
mov rcx, r14
call fcn.14011b120
mov dword [rsp + 0x7c], 0xffffffff
mov rcx, qword [rbx + 0x38]
mov r8d, InitCommonControls
lea rdx, [rsp + 0x78]
cmp dword [rbx + 0xb54], r13d
jne 0x140041886
xor r9d, r9d
call fcn.140026600
jmp 0x14004188e
mov r9b, 7
call fcn.1400261c0
mov byte [rbx + 0xb3e], r13b
xor al, al
mov rcx, qword [rbp + 0x4c0]
xor rcx, rsp
call fcn.14011b0c0
mov rbx, qword [rsp + 0x628]
add rsp, 0x5d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret