Function at 0x455938
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 - 0x238]
sub rsp, 0x338
or qword [rsp + 0x48], 0xffffffffffffffff
lea rax, [0x00486230]
xor r12d, r12d
mov qword [rsp + 0x40], rax
mov ebx, 0x80000000
mov qword [rsp + 0x50], 0x1000
mov r8d, ebx
mov qword [rsp + 0x58], r12
lea rdx, [0x004e1050]
mov dword [rsp + 0x60], 0x400000
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x78], r12d
mov byte [rsp + 0x7c], r12b
mov qword [rbp - 0x80], r12
mov dword [rsp + 0x20], 3
call fcn.0040bad8
mov rsi, qword [rsp + 0x58]
mov r13d, dword [rsp + 0x54]
test al, al
je 0x45622f
test rsi, rsi
je 0x45622f
test ebx, r13d
jne 0x4559e7
bt r13d, 0x1c
jae 0x45622f
mov r15d, dword [rsp + 0x74]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
cmp r15d, ebx
ja 0x455cf3
mov eax, ebx
mov edx, 0xf8
sub eax, r15d
cmp eax, edx
jae 0x455cfd
cmp rdi, 0xffffffffffffffff
je 0x455cf3
bt r13d, 0x1e
jb 0x455a2c
bt r13d, 0x1c
jae 0x455ad5
cmp ebx, 1
jb 0x455ad5
mov r14b, byte [rsp + 0x7c]
test r14b, r14b
je 0x455ada
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x29c]
mov edx, eax
mov qword [rbp + 0x298], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x298], eax
cmp eax, 0xffffffff
jne 0x455a7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455c32
cmp qword [rbp + 0x298], 0xffffffffffffffff
je 0x455c32
mov eax, r12d
mov dword [rbp + 0x288], eax
test ebx, ebx
je 0x455ac3
lea r9, [rbp + 0x288]
mov qword [rsp + 0x20], r12
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 + 0x288]
mov dword [rbp + 0x288], eax
cmp ebx, eax
jne 0x455c32
mov r14b, r12b
mov edx, 0xf8
jmp 0x455ada
mov r14b, byte [rsp + 0x7c]
mov r8d, dword [rsp + 0x60]
mov r10, r15
add r10, qword [rsp + 0x68]
mov ecx, dword [rsp + 0x50]
cmp r8d, edx
mov r12d, dword [rsp + 0x50]
mov rax, r10
cmovb r8d, edx
xor edx, edx
div rcx
sub r10, rdx
mov r15, rdx
mov qword [rsp + 0x38], r10
lea eax, [rdx + r8]
cmp eax, r12d
cmova r12d, eax
mov eax, dword [rsp + 0x78]
mov dword [rbp + 0x280], eax
cmp r12d, eax
jbe 0x455b5e
mov ecx, r12d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov qword [rbp + 0x280], rax
test rax, rax
je 0x455c2f
mov rcx, rsi
call fcn.00422660
mov rsi, qword [rbp + 0x280]
mov r10, qword [rsp + 0x38]
mov dword [rbp + 0x280], r12d
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 0x455b8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455c2f
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455c2f
test rsi, rsi
je 0x455bf1
cmp r12d, 1
jb 0x455bf1
xor r13d, r13d
mov ebx, r13d
mov r8d, r12d
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x290], r13d
add rdx, rsi
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x290]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x455be7
mov eax, dword [rbp + 0x290]
test eax, eax
je 0x455be7
add ebx, eax
cmp ebx, r12d
jb 0x455bab
mov r13d, dword [rsp + 0x54]
xor r12d, r12d
jmp 0x455bf7
xor r12d, r12d
mov ebx, r12d
mov rax, qword [rsp + 0x38]
mov r14b, r12b
mov qword [rsp + 0x68], rax
cmp r15d, ebx
ja 0x455c32
cmp r15d, dword [rbp + 0x280]
ja 0x455c32
mov edx, 0xf8
mov r12d, ebx
sub r12d, r15d
cmp r12d, edx
jae 0x455d11
test r12d, r12d
jne 0x455d14
xor r12d, r12d
cmp rdi, 0xffffffffffffffff
je 0x455cc3
test rsi, rsi
je 0x455cd0
bt r13d, 0x1e
jb 0x455c53
bt r13d, 0x1c
jae 0x455cc3
cmp ebx, 1
jb 0x455cc3
test r14b, r14b
je 0x455cc3
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x284]
mov edx, eax
mov qword [rbp + 0x280], rax
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x280], eax
cmp eax, 0xffffffff
jne 0x455c93
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455cc3
cmp qword [rbp + 0x280], 0xffffffffffffffff
je 0x455cc3
mov dword [rbp + 0x280], r12d
test ebx, ebx
je 0x455cc3
lea r9, [rbp + 0x280]
mov qword [rsp + 0x20], r12
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rsi, rsi
je 0x455cd0
mov rcx, rsi
call fcn.00422660
cmp rdi, 0xffffffffffffffff
je 0x455cdf
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x338
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r14b, byte [rsp + 0x7c]
jmp 0x455c32
mov eax, dword [rsp + 0x78]
mov r14b, byte [rsp + 0x7c]
mov dword [rbp + 0x280], eax
jmp 0x455c17
mov r12d, edx
mov eax, r15d
add rax, rsi
mov ecx, r12d
mov qword [rsp + 0x38], rax
je 0x455d3d
cmp rcx, rdx
ja 0x455d3d
mov r8d, ecx
mov rdx, rax
lea rcx, [0x004e0f58]
call fcn.00424180
jmp 0x455d7c
mov r8, rdx
lea rcx, [0x004e0f58]
xor edx, edx
call fcn.00424830
cmp qword [rsp + 0x38], 0
jne 0x455d63
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x455d77
cmp r12d, 0xf8
jbe 0x455d7c
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r15d, r12d
cmp r12d, 0xf8
jne 0x455c2f
cmp dword [0x004e0f58], 2
jne 0x455c2f
xor r12d, r12d
lea r8, [0x00400000]
mov ecx, r12d
mov edx, 9
movzx eax, word [rcx + r8 + 0x90290]
cmp word [rcx + r8 + 0xe0f5c], ax
jne 0x455c32
add rcx, 2
sub rdx, 1
jne 0x455dab
xor ecx, ecx
call fcn.004370d4
mov qword [rbp - 0x68], rax
mov edx, 0x288
test rsi, rsi
je 0x455f7e
test r13d, r13d
js 0x455df6
bt r13d, 0x1c
jae 0x455f7e
cmp r15d, ebx
ja 0x455f7e
mov eax, ebx
sub eax, r15d
cmp eax, edx
jae 0x45608e
cmp rdi, 0xffffffffffffffff
je 0x455f7e
bt r13d, 0x1e
jb 0x455e28
bt r13d, 0x1c
jae 0x455ed4
cmp ebx, 1
jb 0x455ed4
test r14b, r14b
je 0x455ed4
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x29c]
mov edx, eax
mov qword [rbp + 0x298], rax
xor r9d, r9d
mov rcx, rdi
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x298], eax
cmp eax, 0xffffffff
jne 0x455e7b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
jne 0x455f83
jmp 0x455e7d
xor ecx, ecx
cmp qword [rbp + 0x298], 0xffffffffffffffff
je 0x455f83
mov dword [rbp + 0x288], ecx
mov eax, ecx
test ebx, ebx
je 0x455ec4
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x288]
mov rcx, rdi
mov r8d, ebx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [rbp + 0x288]
mov dword [rbp + 0x288], eax
xor ecx, ecx
cmp ebx, eax
jne 0x455f83
mov r14b, cl
mov edx, 0x288
mov r9d, dword [rsp + 0x50]
mov r8d, dword [rsp + 0x60]
mov r12d, r15d
mov r15d, r9d
add r12, qword [rsp + 0x68]
cmp r8d, edx
mov rax, r12
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 + 0x280]
jbe 0x455f48
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r12, rax
test rax, rax
je 0x455f7e
mov rcx, rsi
call fcn.00422660
mov rsi, r12
mov dword [rbp + 0x280], 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 0x456000
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
je 0x456002
mov r12d, dword [rsp + 0x68]
cmp rdi, 0xffffffffffffffff
je 0x4561ed
test rsi, rsi
je 0x456202
bt r13d, 0x1e
jb 0x455fa8
bt r13d, 0x1c
jae 0x4561ed
cmp ebx, 1
jb 0x4561ed
test r14b, r14b
je 0x4561ed
mov rax, qword [rsp + 0x68]
lea r8, [rbp + 0x284]
xor r9d, r9d
mov qword [rbp + 0x280], rax
mov edx, r12d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x280], eax
cmp eax, 0xffffffff
jne 0x4561bc
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
jne 0x4561ed
jmp 0x4561be
xor ecx, ecx
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455f7e
test rsi, rsi
je 0x456064
cmp r15d, 1
jb 0x456064
xor r12d, r12d
mov ebx, r12d
mov r8d, r15d
mov edx, ebx
sub r8d, ebx
mov dword [rbp + 0x290], r12d
add rdx, rsi
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x290]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45605b
mov eax, dword [rbp + 0x290]
test eax, eax
je 0x45605b
add ebx, eax
cmp ebx, r15d
jb 0x45601f
mov r12, qword [rsp + 0x38]
xor ecx, ecx
jmp 0x456066
mov ebx, ecx
mov rax, qword [rbp - 0x70]
mov r14b, cl
mov qword [rsp + 0x68], r12
mov r15d, eax
cmp eax, ebx
ja 0x455f7e
cmp eax, dword [rbp + 0x280]
ja 0x455f7e
mov edx, 0x288
mov r12d, ebx
sub r12d, r15d
cmp r12d, edx
jae 0x4560a4
test r12d, r12d
je 0x455f7e
jmp 0x4560a7
mov r12d, edx
mov eax, r15d
add rax, rsi
mov ecx, r12d
mov qword [rbp - 0x70], rax
je 0x4560cc
cmp rcx, rdx
ja 0x4560cc
mov r8d, ecx
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.00424180
jmp 0x456108
mov r8, rdx
lea rcx, [rbp - 0x60]
xor edx, edx
call fcn.00424830
xor ecx, ecx
cmp qword [rbp - 0x70], rcx
jne 0x4560ef
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x456103
cmp r12d, 0x288
jbe 0x456108
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r15d, r12d
cmp r12d, 0x288
jne 0x455f7e
lea r8, [0x00489ec0]
mov edx, r12d
lea rcx, [rbp - 0x60]
call fcn.00460de4
xor r12d, r12d
mov edx, 0x288
cmp word [rbp - 0x60], r12w
je 0x455ddd
cmp word [rbp + 0x20], r12w
jne 0x456153
cmp word [rbp + 0x120], r12w
je 0x455ddd
mov rax, qword [rbp + 0x220]
test rax, rax
je 0x45616e
mov edx, 0x288
cmp rax, qword [rbp - 0x68]
jle 0x455ddd
mov edx, dword [0x004e1480]
lea rcx, [0x004e1468]
inc edx
call fcn.00403cbc
mov edx, 0x288
test al, al
je 0x455ddd
mov eax, dword [0x004e1488]
lea rdx, [rbp - 0x60]
mov r8d, eax
imul eax, dword [0x004e1480]
mov ecx, eax
add rcx, qword [0x004e1478]
call fcn.00424180
inc dword [0x004e1480]
jmp 0x455dd8
xor ecx, ecx
cmp qword [rbp + 0x280], 0xffffffffffffffff
je 0x4561ed
mov dword [rbp + 0x280], ecx
test ebx, ebx
je 0x4561ed
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x280]
mov rcx, rdi
mov r8d, ebx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor r12d, r12d
test rsi, rsi
je 0x456205
mov rcx, rsi
call fcn.00422660
mov esi, r12d
jmp 0x456205
xor r12d, r12d
mov qword [rsp + 0x68], r12
mov r13d, r12d
mov ebx, r12d
mov r14b, r12b
cmp rdi, 0xffffffffffffffff
je 0x455cc3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
jmp 0x455c32
mov r14b, byte [rsp + 0x7c]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
jmp 0x455c32