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

Disassembly:
sub esp, 0x3f4
push ebx
mov ebx, dword [esp + 0x3fc]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [esp + 0x3c]
xor ebp, ebp
push 1
push eax
push ebp
push ebx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
call esi
mov dword [esp + 0x38], eax
mov ecx, 0xdb
xor eax, eax
lea edi, [esp + 0x95]
mov byte [esp + 0x94], 0
push ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
lea ecx, [esp + 0x9c]
push ebp
push ecx
push ebx
stosb byte es:[edi], al
call fcn.12fb86a0
add esp, 0x14
test eax, eax
je 0x12fb81a2
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x55]
mov byte [esp + 0x54], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2f0]
lea edx, [esp + 0x2c]
stosw word es:[edi], ax
stosb byte es:[edi], al
push edx
mov edx, dword [esp + 0x2ec]
lea eax, [esp + 0x58]
push 0x40
push eax
mov eax, dword [esp + 0x1c0]
push ecx
push edx
push eax
mov dword [esp + 0x44], ebp
call fcn.12fc0120
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x1d4]
push ecx
lea eax, [esp + 0x70]
push edx
push eax
call fcn.12fedb50
add esp, 0x24
test eax, eax
jne 0x12fb81af
mov dword [0x131c8f38], 0x1b
mov dword [0x131c8f3c], 0x246d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3f4
ret
mov ecx, dword [esp + 0x1b8]
push ecx
call fcn.12ff0660
add esp, 4
cmp eax, ebp
mov dword [esp + 0x48], eax
jne 0x12fb81dd
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x2478
jmp 0x12fb8197
cmp dword [esp + 0x1dc], ebp
jne 0x12fb81f6
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3f4
ret
mov edx, dword [esp + 0xb8]
mov eax, dword [esp + 0xb4]
mov edi, dword [esp + 0x40c]
push edx
push eax
push edi
call fcn.12fee810
add esp, 0xc
test eax, eax
jne 0x12fb8233
mov dword [0x131c8f38], 0x25
mov dword [0x131c8f3c], 0x2485
jmp 0x12fb8197
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x3c]
push ebp
push ecx
push edx
push ebx
call esi
mov eax, dword [esp + 0x1cc]
mov ecx, dword [esp + 0x1d0]
lea edx, [esp + 0x50]
push 1
push edx
push eax
push ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
call esi
push ebp
push ebp
push ebp
push edi
call esi
xor eax, eax
xor esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], ebp
xor ebx, ebx
mov ecx, dword [esp + 0x1dc]
inc eax
cmp eax, ecx
mov dword [esp + 0x44], eax
ja 0x12fb842c
xor ecx, ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x14], ecx
lea eax, [esp + 0x14]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
push ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x40c]
push edx
push 0x10
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fb8439
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x12fb8452
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jae 0x12fb8317
test esi, esi
je 0x12fb8300
push esi
call fcn.12f5bf80
mov eax, dword [esp + 0x20]
add esp, 4
push eax
mov dword [esp + 0x34], eax
call fcn.12f5bf8b
mov esi, eax
add esp, 4
test esi, esi
je 0x12fb846b
mov ecx, dword [esp + 0x30]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x408]
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fb8497
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
jb 0x12fb84b0
mov ecx, dword [esp + 0x18]
push ecx
push eax
push esi
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fb84c6
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
cmp eax, edi
jbe 0x12fb8385
mov edi, eax
cmp ebx, edi
jae 0x12fb83ab
test ebp, ebp
je 0x12fb8396
push ebp
call fcn.12f5bf80
add esp, 4
push edi
mov ebx, edi
call fcn.12f5bf8b
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x12fb84dc
mov ecx, ebx
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
lea edx, [esp + 0x28]
and ecx, 3
push edx
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c]
push ebx
push ebp
mov eax, dword [ecx]
push edx
mov edx, dword [esp + 0x3c]
push esi
push edx
lea edx, [esp + 0x6c]
xor edi, edi
push edx
mov dword [esp + 0x44], edi
call dword [eax + 0x14]
test eax, eax
je 0x12fb84f2
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40c]
lea eax, [esp + 0x40]
push edi
push eax
push ecx
push ebp
push edx
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x12fb8508
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jb 0x12fb851e
mov eax, dword [esp + 0x44]
jmp 0x12fb828a
mov dword [esp + 0x34], 1
jmp 0x12fb8545
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x24ac
jmp 0x12fb8532
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x24b4
jmp 0x12fb8532
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x24c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
jmp 0x12fb8552
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x24cb
jmp 0x12fb8532
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x24d1
jmp 0x12fb8532
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x24d9
jmp 0x12fb8532
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x24e8
jmp 0x12fb8532
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x24f4
jmp 0x12fb8532
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x24ff
jmp 0x12fb8532
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x2505
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
test esi, esi
je 0x12fb8552
push esi
call fcn.12f5bf80
add esp, 4
test ebp, ebp
je 0x12fb855f
push ebp
call fcn.12f5bf80
add esp, 4
mov edi, dword [esp + 0x40c]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x12fb81a2
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x12fb81a2
mov eax, dword [esp + 0x410]
test eax, eax
je 0x12fb8597
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test esi, esi
jne 0x12fb81a2
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3f4
ret