Function at 0x455080
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 0x45591e
test rsi, rsi
je 0x45591e
test ebx, r13d
jne 0x45512f
bt r13d, 0x1c
jae 0x45591e
mov r12d, dword [rsp + 0x74]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
cmp r12d, ebx
ja 0x455433
mov eax, ebx
mov edx, 0xf8
sub eax, r12d
cmp eax, edx
jae 0x45543d
cmp rdi, 0xffffffffffffffff
je 0x455433
bt r13d, 0x1e
jb 0x455174
bt r13d, 0x1c
jae 0x45521d
cmp ebx, 1
jb 0x45521d
mov r14b, byte [rsp + 0x7c]
test r14b, r14b
je 0x455222
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 0x4551c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455372
cmp qword [rbp + 0x2d8], 0xffffffffffffffff
je 0x455372
mov eax, r15d
mov dword [rbp + 0x2c8], eax
test ebx, ebx
je 0x45520b
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 0x455372
mov r14b, r15b
mov edx, 0xf8
jmp 0x455222
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 0x4552a6
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov qword [rbp + 0x2c0], rax
test rax, rax
je 0x45536f
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 0x4552d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45536f
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x45536f
test rsi, rsi
je 0x455331
cmp r15d, 1
jb 0x455331
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 0x45532c
mov eax, dword [rbp + 0x2d0]
test eax, eax
je 0x45532c
add ebx, eax
cmp ebx, r15d
jb 0x4552ef
xor r15d, r15d
jmp 0x455337
xor r15d, r15d
mov ebx, r15d
mov rax, qword [rsp + 0x38]
mov r14b, r15b
mov qword [rsp + 0x68], rax
cmp r12d, ebx
ja 0x455372
cmp r12d, dword [rbp + 0x2c0]
ja 0x455372
mov edx, 0xf8
mov r15d, ebx
sub r15d, r12d
cmp r15d, edx
jae 0x455451
test r15d, r15d
jne 0x455454
xor r15d, r15d
cmp rdi, 0xffffffffffffffff
je 0x455403
test rsi, rsi
je 0x455410
bt r13d, 0x1e
jb 0x455393
bt r13d, 0x1c
jae 0x455403
cmp ebx, 1
jb 0x455403
test r14b, r14b
je 0x455403
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 0x4553d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455403
cmp qword [rbp + 0x2c0], 0xffffffffffffffff
je 0x455403
mov dword [rbp + 0x2c0], r15d
test ebx, ebx
je 0x455403
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 0x455410
mov rcx, rsi
call fcn.00422660
cmp rdi, 0xffffffffffffffff
je 0x45541f
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 0x455372
mov eax, dword [rsp + 0x78]
mov r14b, byte [rsp + 0x7c]
mov dword [rbp + 0x2c0], eax
jmp 0x455357
mov r15d, edx
mov eax, r12d
add rax, rsi
mov ecx, r15d
mov qword [rsp + 0x38], rax
je 0x45547d
cmp rcx, rdx
ja 0x45547d
mov r8d, ecx
mov rdx, rax
lea rcx, [0x004e0f58]
call fcn.00424180
jmp 0x4554bc
mov r8, rdx
lea rcx, [0x004e0f58]
xor edx, edx
call fcn.00424830
cmp qword [rsp + 0x38], 0
jne 0x4554a3
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x4554b7
cmp r15d, 0xf8
jbe 0x4554bc
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r12d, r15d
cmp r15d, 0xf8
jne 0x45536f
xor r15d, r15d
cmp dword [0x004e0f58], 2
jne 0x455751
lea edx, [r15 + 9]
mov ecx, r15d
lea r8, [0x00400000]
movzx eax, word [rcx + r8 + 0x90290]
cmp word [rcx + r8 + 0xe0f5c], ax
jne 0x455751
add rcx, 2
sub rdx, 1
jne 0x4554ea
xor ecx, ecx
call fcn.004370d4
mov qword [rbp - 0x68], rax
mov edx, 0x2c8
test rsi, rsi
je 0x45574a
test r13d, r13d
js 0x455535
bt r13d, 0x1c
jae 0x45574a
cmp r12d, ebx
ja 0x45574a
mov eax, ebx
sub eax, r12d
cmp eax, edx
jae 0x45572f
cmp rdi, 0xffffffffffffffff
je 0x45574a
bt r13d, 0x1e
jb 0x455567
bt r13d, 0x1c
jae 0x455609
cmp ebx, 1
jb 0x455609
test r14b, r14b
je 0x455609
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 0x4555b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x45574a
cmp qword [rbp + 0x2d8], 0xffffffffffffffff
je 0x45574a
mov eax, r15d
mov dword [rbp + 0x2c8], eax
test ebx, ebx
je 0x4555f9
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 0x45574a
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 0x45567e
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r12, rax
test rax, rax
je 0x455747
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 0x4556ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455747
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455747
test rsi, rsi
je 0x455709
cmp r15d, 1
jb 0x455709
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 0x455704
mov eax, dword [rbp + 0x2d0]
test eax, eax
je 0x455704
add ebx, eax
cmp ebx, r15d
jb 0x4556c7
xor r15d, r15d
jmp 0x45570f
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 0x45574a
cmp eax, dword [rbp + 0x2c0]
ja 0x45574a
mov edx, 0x2c8
mov r15d, ebx
sub r15d, r12d
cmp r15d, edx
jae 0x45581c
test r15d, r15d
jne 0x45581f
xor r15d, r15d
mov byte [0x004e1a00], r15b
cmp rdi, 0xffffffffffffffff
je 0x4557e2
test rsi, rsi
je 0x4557f2
bt r13d, 0x1e
jb 0x455772
bt r13d, 0x1c
jae 0x4557e2
cmp ebx, 1
jb 0x4557e2
test r14b, r14b
je 0x4557e2
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 0x4557b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4557e2
cmp qword [rbp + 0x2c0], 0xffffffffffffffff
je 0x4557e2
mov dword [rbp + 0x2c0], r15d
test ebx, ebx
je 0x4557e2
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 0x4557f2
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 0x455403
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
jmp 0x455372
mov r15d, edx
mov eax, r12d
add rax, rsi
mov ecx, r15d
mov qword [rbp - 0x70], rax
je 0x455844
cmp rcx, rdx
ja 0x455844
mov r8d, ecx
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.00424180
jmp 0x455883
mov r8, rdx
lea rcx, [rbp - 0x60]
xor edx, edx
call fcn.00424830
cmp qword [rbp - 0x70], 0
jne 0x455866
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x45587e
mov eax, r15d
mov edx, 0x2c8
cmp rax, rdx
jbe 0x455888
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
mov edx, 0x2c8
add r12d, r15d
cmp r15d, edx
jne 0x455747
xor r15d, r15d
cmp word [rbp - 0x60], r15w
je 0x45551c
cmp byte [rbp + 0x20], r15b
je 0x45551c
cmp byte [rbp + 0x60], r15b
je 0x45551c
mov rax, qword [rbp + 0x260]
test rax, rax
je 0x45551c
cmp rax, qword [rbp - 0x68]
jle 0x45551c
mov edx, dword [0x004e19f0]
lea rcx, [0x004e19d8]
inc edx
call fcn.00403cbc
mov edx, 0x2c8
test al, al
je 0x45551c
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 0x455517
mov r14b, byte [rsp + 0x7c]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
jmp 0x455372