Function at 0x454820
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 0x455077
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 0x454fd1
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 0x454903
movzx eax, word [r8 + rcx]
test ax, ax
je 0x454903
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x4548e0
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 0x45494b
movzx eax, word [r8 + rcx]
test ax, ax
je 0x45494b
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x454928
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 0x45497b
mov ecx, dword [rbp - 0x25]
and ecx, 0x40000000
jne 0x454987
test dword [rbp - 0x25], 0x10000000
jne 0x454987
mov r15b, byte [rbp + 3]
mov ebx, dword [rbp - 9]
jmp 0x454b60
mov r14d, dword [rbp - 5]
mov ebx, dword [rbp - 9]
cmp r14d, ebx
ja 0x454fc8
mov r13d, dword [rbp - 1]
mov dword [rbp + 0x67], r13d
cmp r14d, r13d
ja 0x454fc5
mov eax, r13d
sub eax, r14d
cmp eax, r12d
jae 0x454c12
xor r13d, r13d
cmp rsi, 0xffffffffffffffff
je 0x454fc8
test ecx, ecx
jne 0x4549d5
test dword [rbp - 0x25], 0x10000000
je 0x454a5e
cmp ebx, 1
jb 0x454a5e
mov r15b, byte [rbp + 3]
test r15b, r15b
je 0x454a62
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 0x454a1a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454b60
cmp qword [rbp + 0x7f], 0xffffffffffffffff
je 0x454b60
mov eax, r13d
mov dword [rbp + 0x6f], eax
test ebx, ebx
je 0x454a51
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 0x454b60
mov r15b, r13b
jmp 0x454a62
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 0x454acc
mov ecx, r12d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r13, rax
test rax, rax
je 0x454b5d
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 0x454af5
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454b5d
cmp qword [rbp - 0x49], 0xffffffffffffffff
je 0x454b5d
test rdi, rdi
je 0x454b3f
cmp r12d, 1
jb 0x454b3f
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 0x454b41
mov eax, dword [rbp + 0x77]
test eax, eax
je 0x454b41
add ebx, eax
cmp ebx, r12d
jb 0x454b09
jmp 0x454b41
xor ebx, ebx
mov qword [rbp - 0x11], r13
xor r13d, r13d
mov r15b, r13b
cmp r14d, ebx
ja 0x454b60
mov r13d, dword [rbp + 0x67]
cmp r14d, r13d
jbe 0x454c18
xor r13d, r13d
cmp rsi, 0xffffffffffffffff
je 0x454bda
test rdi, rdi
je 0x454bea
test dword [rbp - 0x25], 0x40000000
jne 0x454b7d
test dword [rbp - 0x25], 0x10000000
je 0x454bda
cmp ebx, 1
jb 0x454bda
test r15b, r15b
je 0x454bda
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 0x454bb3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x454bda
cmp qword [rbp + 0x67], 0xffffffffffffffff
je 0x454bda
mov dword [rbp + 0x67], r13d
test ebx, ebx
je 0x454bda
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 0x454bea
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 0x45505b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rsi, 0xffffffffffffffff
jmp 0x454fe8
mov r15b, byte [rbp + 3]
jmp 0x454c1e
mov r12d, 0xf8
mov eax, r13d
sub eax, r14d
cmp eax, r12d
jae 0x454c34
mov r12d, eax
test eax, eax
je 0x454b5d
mov ecx, r14d
mov r8d, r12d
mov edx, eax
add rcx, rdi
jne 0x454c4e
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x454c76
cmp rdx, r8
jb 0x454c61
lea rdx, [0x004e0f58]
call fcn.00424180
jmp 0x454c7b
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 0x454b5d
xor r8d, r8d
cmp dword [0x004e19f0], r8d
je 0x454fb6
mov r12, qword [0x004e19e8]
mov qword [rbp - 0x49], r12
test r12, r12
je 0x454fb6
mov r9d, 0x2c8
cmp qword [r12 + 0x2c0], r8
je 0x454f76
cmp word [r12], r8w
je 0x454f76
cmp byte [r12 + 0x80], r8b
je 0x454f76
cmp byte [r12 + 0xc0], r8b
je 0x454f76
test rdi, rdi
je 0x454f76
mov edx, dword [rbp - 0x25]
mov ecx, edx
and ecx, 0x40000000
jne 0x454d14
bt edx, 0x1c
jae 0x454f76
cmp r14d, ebx
ja 0x454f76
cmp r14d, r13d
ja 0x454f76
mov eax, r13d
sub eax, r14d
cmp eax, r9d
jae 0x454f06
cmp rsi, 0xffffffffffffffff
je 0x454f76
test ecx, ecx
jne 0x454d4d
bt edx, 0x1c
jae 0x454ddf
cmp ebx, 1
jb 0x454ddf
test r15b, r15b
je 0x454ddf
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 0x454d94
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
test eax, eax
jne 0x454f70
jmp 0x454d97
xor r8d, r8d
cmp qword [rbp + 0x77], 0xffffffffffffffff
je 0x454f70
mov eax, r8d
mov dword [rbp + 0x6f], eax
test ebx, ebx
je 0x454dce
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 0x454f76
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 0x454e51
mov ecx, r13d
lea rdx, [0x0047b0a0]
call fcn.0042267c
xor r8d, r8d
mov qword [rbp + 0x6f], rax
test rax, rax
je 0x454f70
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 0x454e83
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
test eax, eax
jne 0x454f70
jmp 0x454e86
xor r8d, r8d
cmp qword [rbp + 0x77], 0xffffffffffffffff
je 0x454f70
test rdi, rdi
je 0x454ede
cmp r13d, 1
jb 0x454ede
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 0x454ed5
mov eax, dword [rbp + 0x6f]
test eax, eax
je 0x454ed5
add ebx, eax
cmp ebx, r13d
jb 0x454ea2
mov r12, qword [rbp - 0x49]
xor r8d, r8d
jmp 0x454ee1
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 0x454f70
mov r13d, dword [rbp + 0x67]
cmp eax, r13d
ja 0x454f70
mov r9d, 0x2c8
mov eax, r13d
sub eax, r14d
cmp eax, r9d
jae 0x454f1a
mov r13d, eax
test eax, eax
je 0x454f76
jmp 0x454f1d
mov r13d, r9d
mov ecx, r14d
mov r8d, r13d
mov edx, eax
add rcx, rdi
jne 0x454f37
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x454f5b
cmp rdx, r8
jb 0x454f46
mov rdx, r12
call fcn.00424180
jmp 0x454f60
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 0x454fb6
cmp r12, rcx
jb 0x454fb6
mov eax, dword [0x004e19f0]
mov edx, dword [0x004e19f8]
dec eax
imul eax, edx
add rax, rcx
cmp r12, rax
jae 0x454fb6
mov r13d, dword [rbp + 0x67]
mov eax, edx
add rax, r12
mov r12, rax
mov qword [rbp - 0x49], rax
jne 0x454cbf
xor r13d, r13d
mov byte [0x004e1a00], r13b
jmp 0x454b60
xor r13d, r13d
mov r15b, byte [rbp + 3]
jmp 0x454b60
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 0x45505b
test rdi, rdi
je 0x455068
bt r14d, 0x1e
jb 0x455001
bt r14d, 0x1c
jae 0x45505b
cmp ebx, 1
jb 0x45505b
test r12b, r12b
je 0x45505b
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 0x455034
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45505b
cmp qword [rbp + 0x67], 0xffffffffffffffff
je 0x45505b
mov dword [rbp + 0x67], r13d
test ebx, ebx
je 0x45505b
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 0x455068
mov rcx, rdi
call fcn.00422660
cmp rsi, 0xffffffffffffffff
je 0x455077
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