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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x1009a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
mov esi, ecx
mov eax, dword [esi + 0x8dc]
push 1
push 0xc0000000
add eax, 0x14
push eax
mov dword [ebp - 0x250], edi
mov dword [ebp - 0x254], edi
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x258], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x244], eax
cmp eax, 0xffffffff
jne 0x1003a5fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov ebx, eax
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a5e4
mov ecx, dword [esi + 0x8dc]
push ebx
add ecx, 0x14
push ecx
push 0x100038e8
push ebx
push 5
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x1003a5e6
xor eax, eax
mov dword [ebp - 0x240], eax
push 0x1008bdb8
lea eax, [ebp - 0x240]
push eax
call fcn.1006330f
mov eax, dword [esi + 0x8dc]
mov eax, dword [eax + 0x328]
mov ebx, eax
shr ebx, 9
mov dword [ebp - 0x24c], ebx
test eax, 0x1ff
je 0x1003a622
inc ebx
mov dword [ebp - 0x24c], ebx
cmp ebx, edi
mov dword [ebp - 0x248], edi
jg 0x1003a6cd
push 0x38
lea eax, [ebp - 0x23c]
push edi
push eax
call fcn.100620c0
mov eax, dword [esi + 0x8dc]
mov ebx, dword [ebp - 0x244]
mov dword [ebp - 0x23c], 0x10
mov ecx, dword [eax + 0x49c]
mov dword [ebp - 0x238], ecx
mov eax, dword [eax + 0x328]
add esp, 0xc
mov dword [ebp - 0x234], eax
mov eax, dword [ebp - 0x240]
push edi
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x258]
push eax
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1003a7fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a6c1
push esi
push 0x10003888
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x14
mov edi, eax
push ebx
jmp 0x1003a7be
mov ebx, dword [ebp - 0x24c]
push 0x200
lea eax, [ebp - 0x204]
push edi
push eax
call fcn.100620c0
lea eax, [ebx - 1]
add esp, 0xc
cmp dword [ebp - 0x248], eax
jne 0x1003a703
mov ecx, dword [esi + 0x8dc]
lea eax, [ebx - 1]
mov ebx, dword [ecx + 0x328]
shl eax, 9
sub ebx, eax
jmp 0x1003a708
mov ebx, 0x200
push edi
lea eax, [ebp - 0x250]
push eax
push ebx
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003a781
cmp dword [ebp - 0x250], ebx
jne 0x1003a7cf
mov ebx, dword [ebp - 0x248]
cmp ebx, edi
jne 0x1003a750
push 0x40
lea eax, [ebp - 0x204]
push edi
push eax
call fcn.100620c0
add esp, 0xc
lea eax, [ebp - 0x204]
mov ecx, 0x80
mov edx, dword [eax]
add dword [ebp - 0x240], edx
add eax, 4
dec ecx
jne 0x1003a75b
inc ebx
cmp ebx, dword [ebp - 0x24c]
mov dword [ebp - 0x248], ebx
jl 0x1003a6c7
jmp 0x1003a630
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a7b8
push esi
push dword [ebp - 0x248]
push dword [ebp - 0x244]
push 0x10003818
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x1c
mov edi, eax
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x240], edi
jmp 0x1003a5ec
push 0x1010
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a7b8
mov ecx, 0x3e4
push ecx
push dword [ebp - 0x244]
push 0x100037a8
push ecx
push 5
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x1003a7b6
push edi
lea eax, [ebp - 0x254]
push eax
push 0x38
lea eax, [ebp - 0x23c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1003a84c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a6c1
push esi
push ebx
push 0x10003748
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x1003a6bf
cmp dword [ebp - 0x254], 0x38
je 0x1003a877
push 0x1010
call fcn.10062b5c
pop ecx
cmp eax, edi
je 0x1003a6c1
mov ecx, 0x3e4
push ecx
push ebx
push 0x100036d8
push ecx
jmp 0x1003a83c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10062074
leave
ret