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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov esi, 0x1000
cmp edi, esi
jl 0x1003eb5e
mov esi, edi
push dword [0x100e31f8]
lea eax, [esi + esi]
push eax
lea ecx, [ebp - 0x14]
call fcn.10014baa
mov eax, dword [ebp - 0x14]
xor ebx, ebx
push ebx
push 0x200
push dword [ebp + 0x10]
lea ecx, [eax + esi]
push dword [ebp + 0xc]
mov dword [ebp + 0x1c], eax
mov dword [ebp - 8], ecx
mov esi, eax
mov dword [ebp - 4], ebx
call fcn.100b4200
push ebx
push edx
push eax
push dword [ebp + 8]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], edx
call fcn.10040d01
add esp, 0x10
push ebx
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x4e
push 0x100cd408
push esi
call fcn.100b47a0
lea eax, [edi + 0x3fff]
cdq
idiv edi
push ebx
push dword [ebp + 0x10]
mov word [esi + 0xb], di
push dword [ebp + 0xc]
mov word [esi + 0x1fe], 0xaa55
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
call fcn.10040d01
add esp, 0x1c
push ebx
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp + 0x14], 0xffffffff
movzx eax, byte [esi + 0x10]
movzx ebx, word [esi + 0x16]
adc dword [ebp + 0x18], 0xffffffff
push edi
push 0
push esi
mov dword [ebp - 0x10], eax
dec ebx
call fcn.100b40f0
movzx esi, word [esi + 0xe]
add esp, 0xc
sub esi, 2
js 0x1003ec51
add dword [ebp + 0x14], 0xffffffff
adc dword [ebp + 0x18], 0xffffffff
js 0x1003ec51
jg 0x1003ec3b
cmp dword [ebp + 0x14], 0
jb 0x1003ec51
push 0
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec esi
jns 0x1003ec29
mov eax, dword [ebp + 0x1c]
and dword [ebp + 0x10], 0
cmp dword [ebp - 0x10], 0
mov dword [eax], 0xfffff8
jbe 0x1003ecef
add dword [ebp + 0x14], 0xffffffff
adc dword [ebp + 0x18], 0xffffffff
js 0x1003ecef
jg 0x1003ec7a
cmp dword [ebp + 0x14], 0
jb 0x1003ecef
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 4]
push eax
push 0x200
push dword [ebp + 0x1c]
push dword [ebp + 8]
call esi
lea eax, [ebx - 1]
test eax, eax
mov dword [ebp - 0xc], eax
jl 0x1003ece0
mov eax, dword [ebp + 0x14]
add eax, 0xffffffff
adc dword [ebp + 0x18], 0xffffffff
mov dword [ebp + 0x14], eax
js 0x1003ece0
jg 0x1003ecb2
test eax, eax
jb 0x1003ece0
xor ecx, ecx
cmp ecx, dword [ebp + 0x18]
jl 0x1003ecc3
jg 0x1003ecbf
cmp ebx, eax
jbe 0x1003ecc3
mov eax, ebx
jmp 0x1003ecc6
mov ecx, dword [ebp + 0x18]
imul eax, edi
push 0
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call esi
dec dword [ebp - 0xc]
jns 0x1003ec9d
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x10]
jb 0x1003ec68
mov esi, dword [ebp + 0x1c]
and dword [esi], 0
push 0x1a
push str.____________b
push esi
call fcn.100b47a0
mov ebx, dword [ebp + 0x14]
add esp, 0xc
add ebx, 0xffffffff
adc dword [ebp + 0x18], 0xffffffff
js 0x1003ed28
jg 0x1003ed17
test ebx, ebx
jb 0x1003ed28
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp - 0x18]
add esi, 0xfffffffe
js 0x1003ed55
add ebx, 0xffffffff
adc dword [ebp + 0x18], 0xffffffff
js 0x1003ed55
jg 0x1003ed3f
test ebx, ebx
jb 0x1003ed55
push 0
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec esi
jns 0x1003ed30
lea ecx, [ebp - 0x14]
call fcn.1003f96c
pop edi
pop esi
pop ebx
leave
ret