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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov edi, dword [ebp + 8]
add edi, 0xffffffc4
xor eax, eax
push ebp
push 0x4a1bad
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [edi]
call fcn.004058e4
test eax, eax
jb 0x4a1b8a
inc eax
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea eax, [ebp - 0x18]
imul esi, ebx, 0x83
mov edx, dword [edi]
lea edx, [edx + esi*4]
mov ecx, 0x200
call fcn.004049a8
mov eax, dword [ebp - 0x18]
call fcn.004093d0
test al, al
je 0x4a1a9c
lea eax, [ebp - 0x1c]
mov edx, dword [edi]
lea edx, [edx + esi*4]
mov ecx, 0x200
call fcn.004049a8
mov eax, dword [ebp - 0x1c]
call fcn.00409404
test al, al
jne 0x4a1a9c
lea eax, [ebp - 0x20]
imul edx, ebx, 0x83
mov ecx, dword [edi]
lea edx, [ecx + edx*4]
mov ecx, 0x200
call fcn.004049a8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_GetTickCount_1
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0
lea edx, [ebp - 0x2c]
xor ecx, ecx
mov eax, 0x4a1bc4
call fcn.00409d28
mov edx, dword [ebp - 0x24]
pop eax
call fcn.00404a00
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x30]
mov edx, dword [edi]
lea edx, [edx + esi*4]
mov ecx, 0x200
call fcn.004049a8
mov eax, dword [ebp - 0x30]
pop edx
call fcn.0040941c
test al, al
je 0x4a1b80
mov eax, dword [edi]
mov eax, dword [eax + esi*4 + 0x200]
call fcn.004087f0
mov dword [ebp - 0xc], eax
mov eax, dword [edi]
mov eax, dword [eax + esi*4 + 0x204]
call fcn.004087f0
mov dword [ebp - 0x10], eax
push 0
push 0
mov eax, dword [edi]
mov eax, dword [eax + esi*4 + 0x208]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x40]
push eax
call sub.KERNEL32.DLL_SetFilePointer_1
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [edi]
mov eax, dword [eax + esi*4 + 0x200]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x40]
push eax
call sub.KERNEL32.DLL_ReadFile_1
mov eax, dword [edi]
lea eax, [eax + esi*4 + 0x204]
push eax
push 0
mov eax, dword [edi]
mov edx, dword [eax + esi*4 + 0x200]
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.0049e508
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
mov eax, dword [edi]
lea eax, [eax + esi*4]
push eax
call sub.KERNEL32.DLL_CreateFileA_1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x4a1b67
push 0
push 0
push 0
mov eax, dword [ebp - 8]
push eax
call sub.KERNEL32.DLL_SetFilePointer_1
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [edi]
mov eax, dword [eax + esi*4 + 0x204]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.KERNEL32.DLL_WriteFile_1
mov eax, dword [ebp - 8]
push eax
call sub.KERNEL32.DLL_CloseHandle_1
mov eax, dword [ebp - 0x10]
call fcn.004027fc
mov eax, dword [ebp - 0xc]
call fcn.004027fc
inc ebx
dec dword [ebp - 0x14]
jne 0x4a19eb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a1bb4
lea eax, [ebp - 0x30]
call fcn.00404738
lea eax, [ebp - 0x24]
mov edx, 4
call fcn.0040475c
ret