Function at 0x455094
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 - 0x278]
sub rsp, 0x378
or qword [rsp + 0x48], 0xffffffffffffffff
lea rax, [0x00486230]
xor r15d, r15d
mov qword [rsp + 0x40], rax
mov ebx, 0x80000000
mov qword [rsp + 0x50], 0x1000
mov r8d, ebx
mov qword [rsp + 0x58], r15
lea rdx, [0x004e1258]
mov dword [rsp + 0x60], 0x400000
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x78], r15d
mov byte [rsp + 0x7c], r15b
mov qword [rbp - 0x80], r15
mov dword [rsp + 0x20], 3
call fcn.0040bad8
mov rsi, qword [rsp + 0x58]
mov r13d, dword [rsp + 0x54]
test al, al
je 0x455932
test rsi, rsi
je 0x455932
test ebx, r13d
jne 0x455143
bt r13d, 0x1c
jae 0x455932
mov r12d, dword [rsp + 0x74]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
cmp r12d, ebx
ja 0x455447
mov eax, ebx
mov edx, 0xf8
sub eax, r12d
cmp eax, edx
jae 0x455451
cmp rdi, 0xffffffffffffffff
je 0x455447
bt r13d, 0x1e
jb 0x455188
bt r13d, 0x1c
jae 0x455231
cmp ebx, 1
jb 0x455231
mov r14b, byte [rsp + 0x7c]
test r14b, r14b
je 0x455236
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x2dc]
mov edx, eax
mov qword [rbp + 0x2d8], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x2d8], eax
cmp eax, 0xffffffff
jne 0x4551d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455386
cmp qword [rbp + 0x2d8], 0xffffffffffffffff
je 0x455386
mov eax, r15d
mov dword [rbp + 0x2c8], eax
test ebx, ebx
je 0x45521f
lea r9, [rbp + 0x2c8]
mov qword [rsp + 0x20], r15
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x2c8]
mov dword [rbp + 0x2c8], eax
cmp ebx, eax
jne 0x455386
mov r14b, r15b
mov edx, 0xf8
jmp 0x455236
mov r14b, byte [rsp + 0x7c]
mov r8d, dword [rsp + 0x60]
mov r10, r12
add r10, qword [rsp + 0x68]
mov ecx, dword [rsp + 0x50]
cmp r8d, edx
mov r15d, dword [rsp + 0x50]
mov rax, r10
cmovb r8d, edx
xor edx, edx
div rcx
sub r10, rdx
mov r12, rdx
mov qword [rsp + 0x38], r10
lea eax, [rdx + r8]
cmp eax, r15d
cmova r15d, eax
mov eax, dword [rsp + 0x78]
mov dword [rbp + 0x2c0], eax
cmp r15d, eax
jbe 0x4552ba
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov qword [rbp + 0x2c0], rax
test rax, rax
je 0x455383
mov rcx, rsi
call fcn.00422660
mov rsi, qword [rbp + 0x2c0]
mov r10, qword [rsp + 0x38]
mov dword [rbp + 0x2c0], r15d
xor r9d, r9d
mov qword [rsp + 0x30], r10
lea r8, [rsp + 0x34]
mov edx, r10d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x30], eax
cmp eax, 0xffffffff
jne 0x4552ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455383
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455383
test rsi, rsi
je 0x455345
cmp r15d, 1
jb 0x455345
xor ebx, ebx
and dword [rbp + 0x2d0], 0
lea r9, [rbp + 0x2d0]
and qword [rsp + 0x20], 0
mov r8d, r15d
mov edx, ebx
sub r8d, ebx
add rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x455340
mov eax, dword [rbp + 0x2d0]
test eax, eax
je 0x455340
add ebx, eax
cmp ebx, r15d
jb 0x455303
xor r15d, r15d
jmp 0x45534b
xor r15d, r15d
mov ebx, r15d
mov rax, qword [rsp + 0x38]
mov r14b, r15b
mov qword [rsp + 0x68], rax
cmp r12d, ebx
ja 0x455386
cmp r12d, dword [rbp + 0x2c0]
ja 0x455386
mov edx, 0xf8
mov r15d, ebx
sub r15d, r12d
cmp r15d, edx
jae 0x455465
test r15d, r15d
jne 0x455468
xor r15d, r15d
cmp rdi, 0xffffffffffffffff
je 0x455417
test rsi, rsi
je 0x455424
bt r13d, 0x1e
jb 0x4553a7
bt r13d, 0x1c
jae 0x455417
cmp ebx, 1
jb 0x455417
test r14b, r14b
je 0x455417
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x2c4]
mov edx, eax
mov qword [rbp + 0x2c0], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x2c0], eax
cmp eax, 0xffffffff
jne 0x4553e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455417
cmp qword [rbp + 0x2c0], 0xffffffffffffffff
je 0x455417
mov dword [rbp + 0x2c0], r15d
test ebx, ebx
je 0x455417
lea r9, [rbp + 0x2c0]
mov qword [rsp + 0x20], r15
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rsi, rsi
je 0x455424
mov rcx, rsi
call fcn.00422660
cmp rdi, 0xffffffffffffffff
je 0x455433
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x378
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r14b, byte [rsp + 0x7c]
jmp 0x455386
mov eax, dword [rsp + 0x78]
mov r14b, byte [rsp + 0x7c]
mov dword [rbp + 0x2c0], eax
jmp 0x45536b
mov r15d, edx
mov eax, r12d
add rax, rsi
mov ecx, r15d
mov qword [rsp + 0x38], rax
je 0x455491
cmp rcx, rdx
ja 0x455491
mov r8d, ecx
mov rdx, rax
lea rcx, [0x004e0f58]
call fcn.00424180
jmp 0x4554d0
mov r8, rdx
lea rcx, [0x004e0f58]
xor edx, edx
call fcn.00424830
cmp qword [rsp + 0x38], 0
jne 0x4554b7
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x4554cb
cmp r15d, 0xf8
jbe 0x4554d0
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r12d, r15d
cmp r15d, 0xf8
jne 0x455383
xor r15d, r15d
cmp dword [0x004e0f58], 2
jne 0x455765
lea edx, [r15 + 9]
mov ecx, r15d
lea r8, [0x00400000]
movzx eax, word [rcx + r8 + 0x90290]
cmp word [rcx + r8 + 0xe0f5c], ax
jne 0x455765
add rcx, 2
sub rdx, 1
jne 0x4554fe
xor ecx, ecx
call fcn.004370d4
mov qword [rbp - 0x68], rax
mov edx, 0x2c8
test rsi, rsi
je 0x45575e
test r13d, r13d
js 0x455549
bt r13d, 0x1c
jae 0x45575e
cmp r12d, ebx
ja 0x45575e
mov eax, ebx
sub eax, r12d
cmp eax, edx
jae 0x455743
cmp rdi, 0xffffffffffffffff
je 0x45575e
bt r13d, 0x1e
jb 0x45557b
bt r13d, 0x1c
jae 0x45561d
cmp ebx, 1
jb 0x45561d
test r14b, r14b
je 0x45561d
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x2dc]
mov edx, eax
mov qword [rbp + 0x2d8], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x2d8], eax
cmp eax, 0xffffffff
jne 0x4555c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45575e
cmp qword [rbp + 0x2d8], 0xffffffffffffffff
je 0x45575e
mov eax, r15d
mov dword [rbp + 0x2c8], eax
test ebx, ebx
je 0x45560d
lea r9, [rbp + 0x2c8]
mov qword [rsp + 0x20], r15
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x2c8]
mov dword [rbp + 0x2c8], eax
cmp ebx, eax
jne 0x45575e
mov r14b, r15b
mov edx, 0x2c8
add r12, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x50]
mov rax, r12
mov r8d, dword [rsp + 0x60]
mov r15d, r9d
cmp r8d, edx
cmovb r8d, edx
xor edx, edx
div r9
sub r12, rdx
mov qword [rbp - 0x70], rdx
mov rax, rdx
mov qword [rsp + 0x38], r12
add eax, r8d
cmp eax, r9d
cmova r15d, eax
cmp r15d, dword [rbp + 0x2c0]
jbe 0x455692
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r12, rax
test rax, rax
je 0x45575b
mov rcx, rsi
call fcn.00422660
mov rsi, r12
mov dword [rbp + 0x2c0], r15d
mov r12, qword [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x30], r12
lea r8, [rsp + 0x34]
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x30], eax
cmp eax, 0xffffffff
jne 0x4556c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45575b
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x45575b
test rsi, rsi
je 0x45571d
cmp r15d, 1
jb 0x45571d
xor ebx, ebx
and dword [rbp + 0x2d0], 0
lea r9, [rbp + 0x2d0]
and qword [rsp + 0x20], 0
mov r8d, r15d
mov edx, ebx
sub r8d, ebx
add rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x455718
mov eax, dword [rbp + 0x2d0]
test eax, eax
je 0x455718
add ebx, eax
cmp ebx, r15d
jb 0x4556db
xor r15d, r15d
jmp 0x455723
xor r15d, r15d
mov ebx, r15d
mov rax, qword [rbp - 0x70]
mov r14b, r15b
mov qword [rsp + 0x68], r12
mov r12d, eax
cmp eax, ebx
ja 0x45575e
cmp eax, dword [rbp + 0x2c0]
ja 0x45575e
mov edx, 0x2c8
mov r15d, ebx
sub r15d, r12d
cmp r15d, edx
jae 0x455830
test r15d, r15d
jne 0x455833
xor r15d, r15d
mov byte [0x004e1a00], r15b
cmp rdi, 0xffffffffffffffff
je 0x4557f6
test rsi, rsi
je 0x455806
bt r13d, 0x1e
jb 0x455786
bt r13d, 0x1c
jae 0x4557f6
cmp ebx, 1
jb 0x4557f6
test r14b, r14b
je 0x4557f6
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x2c4]
mov edx, eax
mov qword [rbp + 0x2c0], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x2c0], eax
cmp eax, 0xffffffff
jne 0x4557c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4557f6
cmp qword [rbp + 0x2c0], 0xffffffffffffffff
je 0x4557f6
mov dword [rbp + 0x2c0], r15d
test ebx, ebx
je 0x4557f6
lea r9, [rbp + 0x2c0]
mov qword [rsp + 0x20], r15
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rsi, rsi
je 0x455806
mov rcx, rsi
call fcn.00422660
mov rsi, r15
mov qword [rsp + 0x68], r15
mov r13d, r15d
mov ebx, r15d
mov r14b, r15b
cmp rdi, 0xffffffffffffffff
je 0x455417
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
jmp 0x455386
mov r15d, edx
mov eax, r12d
add rax, rsi
mov ecx, r15d
mov qword [rbp - 0x70], rax
je 0x455858
cmp rcx, rdx
ja 0x455858
mov r8d, ecx
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.00424180
jmp 0x455897
mov r8, rdx
lea rcx, [rbp - 0x60]
xor edx, edx
call fcn.00424830
cmp qword [rbp - 0x70], 0
jne 0x45587a
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x455892
mov eax, r15d
mov edx, 0x2c8
cmp rax, rdx
jbe 0x45589c
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
mov edx, 0x2c8
add r12d, r15d
cmp r15d, edx
jne 0x45575b
xor r15d, r15d
cmp word [rbp - 0x60], r15w
je 0x455530
cmp byte [rbp + 0x20], r15b
je 0x455530
cmp byte [rbp + 0x60], r15b
je 0x455530
mov rax, qword [rbp + 0x260]
test rax, rax
je 0x455530
cmp rax, qword [rbp - 0x68]
jle 0x455530
mov edx, dword [0x004e19f0]
lea rcx, [0x004e19d8]
inc edx
call fcn.00403cbc
mov edx, 0x2c8
test al, al
je 0x455530
mov eax, dword [0x004e19f8]
lea rdx, [rbp - 0x60]
mov r8d, eax
imul eax, dword [0x004e19f0]
mov ecx, eax
add rcx, qword [0x004e19e8]
call fcn.00424180
inc dword [0x004e19f0]
jmp 0x45552b
mov r14b, byte [rsp + 0x7c]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
jmp 0x455386