Function at 0x45594c
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 0x456243
test rsi, rsi
je 0x456243
test ebx, r13d
jne 0x4559fb
bt r13d, 0x1c
jae 0x456243
mov r15d, dword [rsp + 0x74]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
cmp r15d, ebx
ja 0x455d07
mov eax, ebx
mov edx, 0xf8
sub eax, r15d
cmp eax, edx
jae 0x455d11
cmp rdi, 0xffffffffffffffff
je 0x455d07
bt r13d, 0x1e
jb 0x455a40
bt r13d, 0x1c
jae 0x455ae9
cmp ebx, 1
jb 0x455ae9
mov r14b, byte [rsp + 0x7c]
test r14b, r14b
je 0x455aee
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 0x455a91
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455c46
cmp qword [rbp + 0x298], 0xffffffffffffffff
je 0x455c46
mov eax, r12d
mov dword [rbp + 0x288], eax
test ebx, ebx
je 0x455ad7
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 0x455c46
mov r14b, r12b
mov edx, 0xf8
jmp 0x455aee
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 0x455b72
mov ecx, r12d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov qword [rbp + 0x280], rax
test rax, rax
je 0x455c43
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 0x455ba2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455c43
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455c43
test rsi, rsi
je 0x455c05
cmp r12d, 1
jb 0x455c05
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 0x455bfb
mov eax, dword [rbp + 0x290]
test eax, eax
je 0x455bfb
add ebx, eax
cmp ebx, r12d
jb 0x455bbf
mov r13d, dword [rsp + 0x54]
xor r12d, r12d
jmp 0x455c0b
xor r12d, r12d
mov ebx, r12d
mov rax, qword [rsp + 0x38]
mov r14b, r12b
mov qword [rsp + 0x68], rax
cmp r15d, ebx
ja 0x455c46
cmp r15d, dword [rbp + 0x280]
ja 0x455c46
mov edx, 0xf8
mov r12d, ebx
sub r12d, r15d
cmp r12d, edx
jae 0x455d25
test r12d, r12d
jne 0x455d28
xor r12d, r12d
cmp rdi, 0xffffffffffffffff
je 0x455cd7
test rsi, rsi
je 0x455ce4
bt r13d, 0x1e
jb 0x455c67
bt r13d, 0x1c
jae 0x455cd7
cmp ebx, 1
jb 0x455cd7
test r14b, r14b
je 0x455cd7
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 0x455ca7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x455cd7
cmp qword [rbp + 0x280], 0xffffffffffffffff
je 0x455cd7
mov dword [rbp + 0x280], r12d
test ebx, ebx
je 0x455cd7
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 0x455ce4
mov rcx, rsi
call fcn.00422660
cmp rdi, 0xffffffffffffffff
je 0x455cf3
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 0x455c46
mov eax, dword [rsp + 0x78]
mov r14b, byte [rsp + 0x7c]
mov dword [rbp + 0x280], eax
jmp 0x455c2b
mov r12d, edx
mov eax, r15d
add rax, rsi
mov ecx, r12d
mov qword [rsp + 0x38], rax
je 0x455d51
cmp rcx, rdx
ja 0x455d51
mov r8d, ecx
mov rdx, rax
lea rcx, [0x004e0f58]
call fcn.00424180
jmp 0x455d90
mov r8, rdx
lea rcx, [0x004e0f58]
xor edx, edx
call fcn.00424830
cmp qword [rsp + 0x38], 0
jne 0x455d77
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x455d8b
cmp r12d, 0xf8
jbe 0x455d90
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r15d, r12d
cmp r12d, 0xf8
jne 0x455c43
cmp dword [0x004e0f58], 2
jne 0x455c43
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 0x455c46
add rcx, 2
sub rdx, 1
jne 0x455dbf
xor ecx, ecx
call fcn.004370d4
mov qword [rbp - 0x68], rax
mov edx, 0x288
test rsi, rsi
je 0x455f92
test r13d, r13d
js 0x455e0a
bt r13d, 0x1c
jae 0x455f92
cmp r15d, ebx
ja 0x455f92
mov eax, ebx
sub eax, r15d
cmp eax, edx
jae 0x4560a2
cmp rdi, 0xffffffffffffffff
je 0x455f92
bt r13d, 0x1e
jb 0x455e3c
bt r13d, 0x1c
jae 0x455ee8
cmp ebx, 1
jb 0x455ee8
test r14b, r14b
je 0x455ee8
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 0x455e8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
jne 0x455f97
jmp 0x455e91
xor ecx, ecx
cmp qword [rbp + 0x298], 0xffffffffffffffff
je 0x455f97
mov dword [rbp + 0x288], ecx
mov eax, ecx
test ebx, ebx
je 0x455ed8
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 0x455f97
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 0x455f5c
mov ecx, r15d
lea rdx, [0x0047b0a0]
call fcn.0042267c
mov r12, rax
test rax, rax
je 0x455f92
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 0x456014
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
je 0x456016
mov r12d, dword [rsp + 0x68]
cmp rdi, 0xffffffffffffffff
je 0x456201
test rsi, rsi
je 0x456216
bt r13d, 0x1e
jb 0x455fbc
bt r13d, 0x1c
jae 0x456201
cmp ebx, 1
jb 0x456201
test r14b, r14b
je 0x456201
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 0x4561d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
jne 0x456201
jmp 0x4561d2
xor ecx, ecx
cmp qword [rsp + 0x30], 0xffffffffffffffff
je 0x455f92
test rsi, rsi
je 0x456078
cmp r15d, 1
jb 0x456078
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 0x45606f
mov eax, dword [rbp + 0x290]
test eax, eax
je 0x45606f
add ebx, eax
cmp ebx, r15d
jb 0x456033
mov r12, qword [rsp + 0x38]
xor ecx, ecx
jmp 0x45607a
mov ebx, ecx
mov rax, qword [rbp - 0x70]
mov r14b, cl
mov qword [rsp + 0x68], r12
mov r15d, eax
cmp eax, ebx
ja 0x455f92
cmp eax, dword [rbp + 0x280]
ja 0x455f92
mov edx, 0x288
mov r12d, ebx
sub r12d, r15d
cmp r12d, edx
jae 0x4560b8
test r12d, r12d
je 0x455f92
jmp 0x4560bb
mov r12d, edx
mov eax, r15d
add rax, rsi
mov ecx, r12d
mov qword [rbp - 0x70], rax
je 0x4560e0
cmp rcx, rdx
ja 0x4560e0
mov r8d, ecx
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.00424180
jmp 0x45611c
mov r8, rdx
lea rcx, [rbp - 0x60]
xor edx, edx
call fcn.00424830
xor ecx, ecx
cmp qword [rbp - 0x70], rcx
jne 0x456103
call fcn.004394f0
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x456117
cmp r12d, 0x288
jbe 0x45611c
call fcn.004394f0
mov dword [rax], 0x22
call fcn.004393b4
add r15d, r12d
cmp r12d, 0x288
jne 0x455f92
lea r8, [0x00489ec0]
mov edx, r12d
lea rcx, [rbp - 0x60]
call fcn.00460eb8
xor r12d, r12d
mov edx, 0x288
cmp word [rbp - 0x60], r12w
je 0x455df1
cmp word [rbp + 0x20], r12w
jne 0x456167
cmp word [rbp + 0x120], r12w
je 0x455df1
mov rax, qword [rbp + 0x220]
test rax, rax
je 0x456182
mov edx, 0x288
cmp rax, qword [rbp - 0x68]
jle 0x455df1
mov edx, dword [0x004e1480]
lea rcx, [0x004e1468]
inc edx
call fcn.00403cbc
mov edx, 0x288
test al, al
je 0x455df1
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 0x455dec
xor ecx, ecx
cmp qword [rbp + 0x280], 0xffffffffffffffff
je 0x456201
mov dword [rbp + 0x280], ecx
test ebx, ebx
je 0x456201
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 0x456219
mov rcx, rsi
call fcn.00422660
mov esi, r12d
jmp 0x456219
xor r12d, r12d
mov qword [rsp + 0x68], r12
mov r13d, r12d
mov ebx, r12d
mov r14b, r12b
cmp rdi, 0xffffffffffffffff
je 0x455cd7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
jmp 0x455c46
mov r14b, byte [rsp + 0x7c]
mov ebx, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
jmp 0x455c46