Function at 0x45480c
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
xor r13d, r13d
cmp byte [0x004e1a00], r13b
je 0x455063
or qword [rbp - 0x31], 0xffffffffffffffff
lea rax, [0x00486230]
mov r8d, 0x40000000
mov qword [rbp - 0x39], rax
lea rdx, [0x004e1258]
mov qword [rbp - 0x29], 0x1000
lea rcx, [rbp - 0x39]
mov qword [rbp - 0x21], r13
mov dword [rbp - 0x19], 0x400000
mov qword [rbp - 0x11], r13
mov qword [rbp - 9], r13
mov dword [rbp - 1], r13d
mov byte [rbp + 3], r13b
mov qword [rbp + 7], r13
mov dword [rsp + 0x20], 2
call fcn.0040bad8
test al, al
je 0x454fbd
mov r12d, 0xf8
lea rcx, [0x004e0f58]
mov r8d, r12d
xor edx, edx
call fcn.00424830
lea rcx, [0x004e0f5c]
mov dword [0x004e0f58], 2
lea r8, str.Copyright_2000_2022__MetaQuotes_Ltd.
sub r8, rcx
lea edx, [r13 + 0x3f]
lea rax, [rdx + 0x7fffffbf]
test rax, rax
je 0x4548ef
movzx eax, word [r8 + rcx]
test ax, ax
je 0x4548ef
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x4548cc
test rdx, rdx
lea rax, [rcx - 2]
lea r8, str.cookies
mov edx, select
cmovne rax, rcx
lea rcx, [0x004e0fdc]
sub r8, rcx
mov word [rax], r13w
lea rax, [rdx + 0x7fffffef]
test rax, rax
je 0x454937
movzx eax, word [r8 + rcx]
test ax, ax
je 0x454937
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x454914
mov rdi, qword [rbp - 0x21]
lea rax, [rcx - 2]
mov rsi, qword [rbp - 0x31]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
test rdi, rdi
je 0x454967
mov ecx, dword [rbp - 0x25]
and ecx, 0x40000000
jne 0x454973
test dword [rbp - 0x25], 0x10000000
jne 0x454973
mov r15b, byte [rbp + 3]
mov ebx, dword [rbp - 9]
jmp 0x454b4c
mov r14d, dword [rbp - 5]
mov ebx, dword [rbp - 9]
cmp r14d, ebx
ja 0x454fb4
mov r13d, dword [rbp - 1]
mov dword [rbp + 0x67], r13d
cmp r14d, r13d
ja 0x454fb1
mov eax, r13d
sub eax, r14d
cmp eax, r12d
jae 0x454bfe
xor r13d, r13d
cmp rsi, 0xffffffffffffffff
je 0x454fb4
test ecx, ecx
jne 0x4549c1
test dword [rbp - 0x25], 0x10000000
je 0x454a4a
cmp ebx, 1
jb 0x454a4a
mov r15b, byte [rbp + 3]
test r15b, r15b
je 0x454a4e
mov rax, qword [rbp - 0x11]
lea r8, [rbp + 0x83]
mov edx, eax
mov qword [rbp + 0x7f], rax
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x7f], eax
cmp eax, 0xffffffff
jne 0x454a06
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454b4c
cmp qword [rbp + 0x7f], 0xffffffffffffffff
je 0x454b4c
mov eax, r13d
mov dword [rbp + 0x6f], eax
test ebx, ebx
je 0x454a3d
lea r9, [rbp + 0x6f]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x6f]
mov dword [rbp + 0x6f], eax
cmp ebx, eax
jne 0x454b4c
mov r15b, r13b
jmp 0x454a4e
mov r15b, byte [rbp + 3]
mov r8d, dword [rbp - 0x19]
mov r13, r14
add r13, qword [rbp - 0x11]
mov ecx, dword [rbp - 0x29]
cmp r8d, r12d
mov rax, r13
cmovb r8d, r12d
mov r12d, dword [rbp - 0x29]
xor edx, edx
div rcx
sub r13, rdx
mov r14, rdx
mov qword [rbp + 0x77], r13
lea eax, [rdx + r8]
cmp eax, r12d
cmova r12d, eax
cmp r12d, dword [rbp - 1]
jbe 0x454ab8
mov ecx, r12d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r13, rax
test rax, rax
je 0x454b49
mov rcx, rdi
call fcn.00422660
mov rdi, r13
mov dword [rbp + 0x67], r12d
mov r13, qword [rbp + 0x77]
xor r9d, r9d
mov qword [rbp - 0x49], r13
lea r8, [rbp - 0x45]
mov edx, r13d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x49], eax
cmp eax, 0xffffffff
jne 0x454ae1
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454b49
cmp qword [rbp - 0x49], 0xffffffffffffffff
je 0x454b49
test rdi, rdi
je 0x454b2b
cmp r12d, 1
jb 0x454b2b
xor ebx, ebx
and dword [rbp + 0x77], 0
lea r9, [rbp + 0x77]
and qword [rsp + 0x20], 0
mov r8d, r12d
mov edx, ebx
sub r8d, ebx
add rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x454b2d
mov eax, dword [rbp + 0x77]
test eax, eax
je 0x454b2d
add ebx, eax
cmp ebx, r12d
jb 0x454af5
jmp 0x454b2d
xor ebx, ebx
mov qword [rbp - 0x11], r13
xor r13d, r13d
mov r15b, r13b
cmp r14d, ebx
ja 0x454b4c
mov r13d, dword [rbp + 0x67]
cmp r14d, r13d
jbe 0x454c04
xor r13d, r13d
cmp rsi, 0xffffffffffffffff
je 0x454bc6
test rdi, rdi
je 0x454bd6
test dword [rbp - 0x25], 0x40000000
jne 0x454b69
test dword [rbp - 0x25], 0x10000000
je 0x454bc6
cmp ebx, 1
jb 0x454bc6
test r15b, r15b
je 0x454bc6
mov rax, qword [rbp - 0x11]
lea r8, [rbp + 0x6b]
mov edx, eax
mov qword [rbp + 0x67], rax
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x67], eax
cmp eax, 0xffffffff
jne 0x454b9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454bc6
cmp qword [rbp + 0x67], 0xffffffffffffffff
je 0x454bc6
mov dword [rbp + 0x67], r13d
test ebx, ebx
je 0x454bc6
lea r9, [rbp + 0x67]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rdi, rdi
je 0x454bd6
mov rcx, rdi
call fcn.00422660
mov rdi, r13
mov r14d, r13d
mov r15, r13
mov ebx, r13d
mov r12b, r13b
cmp rsi, 0xffffffffffffffff
je 0x455047
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rsi, 0xffffffffffffffff
jmp 0x454fd4
mov r15b, byte [rbp + 3]
jmp 0x454c0a
mov r12d, 0xf8
mov eax, r13d
sub eax, r14d
cmp eax, r12d
jae 0x454c20
mov r12d, eax
test eax, eax
je 0x454b49
mov ecx, r14d
mov r8d, r12d
mov edx, eax
add rcx, rdi
jne 0x454c3a
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x454c62
cmp rdx, r8
jb 0x454c4d
lea rdx, [0x004e0f58]
call fcn.00424180
jmp 0x454c67
mov r8, rdx
xor edx, edx
call fcn.00424830
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r14d, r12d
mov r15b, 1
cmp r14d, ebx
cmova ebx, r14d
cmp r12d, 0xf8
jne 0x454b49
xor r8d, r8d
cmp dword [0x004e19f0], r8d
je 0x454fa2
mov r12, qword [0x004e19e8]
mov qword [rbp - 0x49], r12
test r12, r12
je 0x454fa2
mov r9d, 0x2c8
cmp qword [r12 + 0x2c0], r8
je 0x454f62
cmp word [r12], r8w
je 0x454f62
cmp byte [r12 + 0x80], r8b
je 0x454f62
cmp byte [r12 + 0xc0], r8b
je 0x454f62
test rdi, rdi
je 0x454f62
mov edx, dword [rbp - 0x25]
mov ecx, edx
and ecx, 0x40000000
jne 0x454d00
bt edx, 0x1c
jae 0x454f62
cmp r14d, ebx
ja 0x454f62
cmp r14d, r13d
ja 0x454f62
mov eax, r13d
sub eax, r14d
cmp eax, r9d
jae 0x454ef2
cmp rsi, 0xffffffffffffffff
je 0x454f62
test ecx, ecx
jne 0x454d39
bt edx, 0x1c
jae 0x454dcb
cmp ebx, 1
jb 0x454dcb
test r15b, r15b
je 0x454dcb
mov rax, qword [rbp - 0x11]
lea r8, [rbp + 0x7b]
mov edx, eax
mov qword [rbp + 0x77], rax
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x77], eax
cmp eax, 0xffffffff
jne 0x454d80
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
test eax, eax
jne 0x454f5c
jmp 0x454d83
xor r8d, r8d
cmp qword [rbp + 0x77], 0xffffffffffffffff
je 0x454f5c
mov eax, r8d
mov dword [rbp + 0x6f], eax
test ebx, ebx
je 0x454dba
mov qword [rsp + 0x20], r8
lea r9, [rbp + 0x6f]
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x6f]
xor r8d, r8d
mov r9d, 0x2c8
cmp ebx, eax
jne 0x454f62
mov r15b, r8b
mov r8d, dword [rbp - 0x19]
mov r10d, r14d
add r10, qword [rbp - 0x11]
cmp r8d, r9d
mov rax, r10
cmovb r8d, r9d
mov r9d, dword [rbp - 0x29]
xor edx, edx
mov r13d, r9d
div r9
sub r10, rdx
mov qword [rbp - 0x41], rdx
mov rax, rdx
mov qword [rbp + 0x7f], r10
add eax, r8d
cmp eax, r9d
cmova r13d, eax
cmp r13d, dword [rbp + 0x67]
jbe 0x454e3d
mov ecx, r13d
lea rdx, [0x0047b0a0]
call fcn.0042267c
xor r8d, r8d
mov qword [rbp + 0x6f], rax
test rax, rax
je 0x454f5c
mov rcx, rdi
call fcn.00422660
mov r10, qword [rbp + 0x7f]
mov rdi, qword [rbp + 0x6f]
mov dword [rbp + 0x67], r13d
xor r9d, r9d
mov qword [rbp + 0x77], r10
lea r8, [rbp + 0x7b]
mov edx, r10d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x77], eax
cmp eax, 0xffffffff
jne 0x454e6f
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
test eax, eax
jne 0x454f5c
jmp 0x454e72
xor r8d, r8d
cmp qword [rbp + 0x77], 0xffffffffffffffff
je 0x454f5c
test rdi, rdi
je 0x454eca
cmp r13d, 1
jb 0x454eca
xor r12d, r12d
mov ebx, r12d
mov r8d, r13d
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x6f], r12d
add rdx, rdi
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x6f]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x454ec1
mov eax, dword [rbp + 0x6f]
test eax, eax
je 0x454ec1
add ebx, eax
cmp ebx, r13d
jb 0x454e8e
mov r12, qword [rbp - 0x49]
xor r8d, r8d
jmp 0x454ecd
mov ebx, r8d
mov rax, qword [rbp + 0x7f]
mov r15b, r8b
mov qword [rbp - 0x11], rax
mov rax, qword [rbp - 0x41]
mov r14d, eax
cmp eax, ebx
ja 0x454f5c
mov r13d, dword [rbp + 0x67]
cmp eax, r13d
ja 0x454f5c
mov r9d, 0x2c8
mov eax, r13d
sub eax, r14d
cmp eax, r9d
jae 0x454f06
mov r13d, eax
test eax, eax
je 0x454f62
jmp 0x454f09
mov r13d, r9d
mov ecx, r14d
mov r8d, r13d
mov edx, eax
add rcx, rdi
jne 0x454f23
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x454f47
cmp rdx, r8
jb 0x454f32
mov rdx, r12
call fcn.00424180
jmp 0x454f4c
mov r8, rdx
xor edx, edx
call fcn.00424830
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r14d, r13d
mov r15b, 1
cmp r14d, ebx
cmova ebx, r14d
xor r8d, r8d
mov r9d, 0x2c8
mov rcx, qword [0x004e19e8]
test rcx, rcx
je 0x454fa2
cmp r12, rcx
jb 0x454fa2
mov eax, dword [0x004e19f0]
mov edx, dword [0x004e19f8]
dec eax
imul eax, edx
add rax, rcx
cmp r12, rax
jae 0x454fa2
mov r13d, dword [rbp + 0x67]
mov eax, edx
add rax, r12
mov r12, rax
mov qword [rbp - 0x49], rax
jne 0x454cab
xor r13d, r13d
mov byte [0x004e1a00], r13b
jmp 0x454b4c
xor r13d, r13d
mov r15b, byte [rbp + 3]
jmp 0x454b4c
mov r12b, byte [rbp + 3]
mov ebx, dword [rbp - 9]
mov r15, qword [rbp - 0x11]
mov rdi, qword [rbp - 0x21]
mov r14d, dword [rbp - 0x25]
mov rsi, qword [rbp - 0x31]
cmp rsi, 0xffffffffffffffff
je 0x455047
test rdi, rdi
je 0x455054
bt r14d, 0x1e
jb 0x454fed
bt r14d, 0x1c
jae 0x455047
cmp ebx, 1
jb 0x455047
test r12b, r12b
je 0x455047
xor r9d, r9d
mov qword [rbp + 0x67], r15
lea r8, [rbp + 0x6b]
mov edx, r15d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x67], eax
cmp eax, 0xffffffff
jne 0x455020
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455047
cmp qword [rbp + 0x67], 0xffffffffffffffff
je 0x455047
mov dword [rbp + 0x67], r13d
test ebx, ebx
je 0x455047
lea r9, [rbp + 0x67]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rdi, rdi
je 0x455054
mov rcx, rdi
call fcn.00422660
cmp rsi, 0xffffffffffffffff
je 0x455063
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret