Function at 0x180099590
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x3b0
mov qword [rsp + 0x368], 0xfffffffffffffffe
mov rax, qword [0x180161180]
xor rax, rsp
mov qword [rsp + 0x3a0], rax
mov qword [rsp + 0x2c8], 0xffffffffffffffff
mov qword [rsp + 0x2b0], 0
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x2c0], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x2d0], 0
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x2b8], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x270], 0
lea rcx, [0x180014d30]
call fcn.1800892c0
mov rcx, qword [rsp + 0x3c0]
mov rcx, qword [rcx + 0x940]
add rcx, 0x28
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x2c8], rax
cmp qword [rsp + 0x2c8], 0xffffffffffffffff
jne 0x1800997c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
mov rdx, qword [rsp + 0x3c0]
mov rdx, qword [rdx + 0x940]
add rdx, 0x28
mov r8d, dword [rsp + 0x44]
lea rcx, [0x180014cd0]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x2e0], rax
cmp qword [rsp + 0x2e0], 0
je 0x180099739
mov rcx, qword [rsp + 0x3c0]
mov rcx, qword [rcx + 0x940]
add rcx, 0x28
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
lea r9, [0x180014c70]
mov edx, 5
mov rcx, qword [rsp + 0x2e0]
call fcn.18008d120
mov qword [rsp + 0x370], rax
jmp 0x180099745
mov qword [rsp + 0x370], 0
mov rax, qword [rsp + 0x370]
mov qword [rsp + 0x2d8], rax
mov rax, qword [rsp + 0x2d8]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x18009979e
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x2e8], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x2e8]
call fcn.1800ec370
mov rax, qword [rsp + 0x3c0]
mov rax, qword [rax + 0x940]
xor edx, edx
mov eax, dword [rax + 0x338]
mov ecx, 0x200
div ecx
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x3c0]
mov rax, qword [rax + 0x940]
xor edx, edx
mov eax, dword [rax + 0x338]
mov ecx, 0x200
div ecx
test edx, edx
je 0x180099811
mov eax, dword [rsp + 0x54]
add eax, 1
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x58], 0
jmp 0x180099826
mov eax, dword [rsp + 0x58]
add eax, 1
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x58], eax
jge 0x180099bac
lea rdi, [rsp + 0x70]
xor eax, eax
mov ecx, 0x200
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x54]
sub eax, 1
cmp dword [rsp + 0x58], eax
jne 0x18009987c
mov rax, qword [rsp + 0x3c0]
mov rax, qword [rax + 0x940]
mov ecx, dword [rsp + 0x54]
sub ecx, 1
imul ecx, ecx, 0x200
mov eax, dword [rax + 0x338]
sub eax, ecx
mov dword [rsp + 0x2d0], eax
jmp 0x180099887
mov dword [rsp + 0x2d0], 0x200
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2c0]
mov r8d, dword [rsp + 0x2d0]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800999d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
mov r9d, dword [rsp + 0x44]
mov r8d, dword [rsp + 0x58]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180014b80]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x2f8], rax
cmp qword [rsp + 0x2f8], 0
je 0x180099942
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
lea r9, [0x180014b10]
mov edx, 5
mov rcx, qword [rsp + 0x2f8]
call fcn.18008d120
mov qword [rsp + 0x378], rax
jmp 0x18009994e
mov qword [rsp + 0x378], 0
mov rax, qword [rsp + 0x378]
mov qword [rsp + 0x2f0], rax
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x1800999a7
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x300], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x300]
call fcn.1800ec370
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x2c0], eax
je 0x180099afc
mov dword [rsp + 0x44], 0x3e4
mov r8d, dword [rsp + 0x44]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180014aa0]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x310], rax
cmp qword [rsp + 0x310], 0
je 0x180099a65
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
lea r9, [0x180014a30]
mov edx, 5
mov rcx, qword [rsp + 0x310]
call fcn.18008d120
mov qword [rsp + 0x380], rax
jmp 0x180099a71
mov qword [rsp + 0x380], 0
mov rax, qword [rsp + 0x380]
mov qword [rsp + 0x308], rax
mov rax, qword [rsp + 0x308]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x180099aca
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x318], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x318]
call fcn.1800ec370
cmp dword [rsp + 0x58], 0
jne 0x180099b42
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x60]
mov r9d, dword [rax + 8]
mov rax, qword [rsp + 0x60]
mov r8d, dword [rax + 4]
mov rax, qword [rsp + 0x60]
mov edx, dword [rax]
lea rcx, [0x1800149a0]
call fcn.1800892c0
lea rdi, [rsp + 0x70]
xor eax, eax
mov ecx, 0x40
rep stosb byte [rdi], al
lea rax, [rsp + 0x70]
mov qword [rsp + 0x2b8], rax
mov dword [rsp + 0x270], 0
jmp 0x180099b6d
mov eax, dword [rsp + 0x270]
add eax, 1
mov dword [rsp + 0x270], eax
movsxd rax, dword [rsp + 0x270]
cmp rax, 0x80
jae 0x180099ba7
mov rax, qword [rsp + 0x2b8]
mov ecx, dword [rax]
mov eax, dword [rsp + 0x4c]
add eax, ecx
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0x2b8]
add rax, 4
mov qword [rsp + 0x2b8], rax
jmp 0x180099b5c
jmp 0x18009981b
lea rdi, [rsp + 0x278]
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
mov dword [rsp + 0x278], 0x10
mov rax, qword [rsp + 0x3c0]
mov rax, qword [rax + 0x940]
mov eax, dword [rax + 0x4c4]
mov dword [rsp + 0x27c], eax
mov rax, qword [rsp + 0x3c0]
mov rax, qword [rax + 0x940]
mov eax, dword [rax + 0x338]
mov dword [rsp + 0x280], eax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x284], eax
mov eax, dword [rsp + 0x284]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x280]
mov r8d, dword [rsp + 0x27c]
mov edx, dword [rsp + 0x278]
lea rcx, [0x180014910]
call fcn.1800892c0
xor r9d, r9d
lea r8, [rsp + 0x48]
mov edx, 8
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
jne 0x180099d61
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
mov edx, dword [rsp + 0x44]
lea rcx, [0x1800148b0]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x328], rax
cmp qword [rsp + 0x328], 0
je 0x180099cca
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x20], eax
lea r9, [0x180014850]
mov edx, 5
mov rcx, qword [rsp + 0x328]
call fcn.18008d120
mov qword [rsp + 0x388], rax
jmp 0x180099cd6
mov qword [rsp + 0x388], 0
mov rax, qword [rsp + 0x388]
mov qword [rsp + 0x320], rax
mov rax, qword [rsp + 0x320]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x180099d2f
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x330], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x330]
call fcn.1800ec370
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, 0x38
lea rdx, [rsp + 0x278]
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180099ea4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
mov r8d, dword [rsp + 0x44]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x1800147f0]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x340], rax
cmp qword [rsp + 0x340], 0
je 0x180099e0d
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
lea r9, [0x180014790]
mov edx, 5
mov rcx, qword [rsp + 0x340]
call fcn.18008d120
mov qword [rsp + 0x390], rax
jmp 0x180099e19
mov qword [rsp + 0x390], 0
mov rax, qword [rsp + 0x390]
mov qword [rsp + 0x338], rax
mov rax, qword [rsp + 0x338]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x180099e72
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x348], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x348]
call fcn.1800ec370
mov eax, dword [rsp + 0x50]
cmp rax, 0x38
je 0x180099fc1
mov dword [rsp + 0x44], 0x3e4
mov r8d, dword [rsp + 0x44]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180014720]
call fcn.1800892c0
mov ecx, 0x1020
call fcn.1800eb9ac
mov qword [rsp + 0x358], rax
cmp qword [rsp + 0x358], 0
je 0x180099f2a
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
lea r9, [0x1800146b0]
mov edx, 5
mov rcx, qword [rsp + 0x358]
call fcn.18008d120
mov qword [rsp + 0x398], rax
jmp 0x180099f36
mov qword [rsp + 0x398], 0
mov rax, qword [rsp + 0x398]
mov qword [rsp + 0x350], rax
mov rax, qword [rsp + 0x350]
mov qword [rsp + 0x2b0], rax
cmp qword [rsp + 0x2b0], 0
je 0x180099f8f
mov rcx, qword [rsp + 0x2b0]
call fcn.18008d1e0
mov rdi, rax
mov rcx, qword [rsp + 0x2b0]
call fcn.1800e3fe0
mov r8, rdi
mov edx, eax
lea rcx, [0x180014bf0]
call fcn.1800892c0
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x360], rax
lea rdx, [0x18015a158]
lea rcx, [rsp + 0x360]
call fcn.1800ec370
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x180014660]
call fcn.1800892c0
mov rcx, qword [rsp + 0x3a0]
xor rcx, rsp
call fcn.1800eb430
add rsp, 0x3b0
pop rdi
ret