Function at 0x1000e219
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
je 0x1000e4f4
cmp dword [ebp + 0x10], edi
je 0x1000e4f4
cmp dword [ebp + 0x14], edi
je 0x1000e4f4
push ebx
push esi
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0xc], edi
call esi
push dword [ebp + 0x10]
mov ebx, eax
call esi
cmp dword [ebp + 8], edi
lea ebx, [ebx + eax + 0x10]
je 0x1000e264
push dword [ebp + 8]
call esi
add ebx, eax
push edi
push 0x80
push 4
push edi
push edi
push 0xc0000000
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x1000e4ed
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1000e299
xor edi, edi
lea eax, [ebp - 0x28]
push eax
lea eax, [edi + ebx]
push eax
call fcn.1000e5dd
mov ebx, eax
xor eax, eax
pop ecx
cmp ebx, eax
pop ecx
je 0x1000e4e4
and byte [ebx], al
cmp edi, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], eax
mov dword [ebp + 0x14], eax
mov dword [ebp - 8], eax
je 0x1000e379
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.1000e5dd
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
pop ecx
je 0x1000e4dd
lea ecx, [ebp - 0x1c]
push 0
push ecx
push edi
push eax
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000e364
cmp dword [ebp - 0x1c], edi
jne 0x1000e364
push 0
mov dword [ebp - 0xc], 1
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push ebx
call fcn.1000e573
mov eax, dword [ebp - 0x20]
add esp, 0x10
and byte [eax + ebx], 0
mov eax, dword [ebp + 8]
test eax, eax
je 0x1000e351
cmp byte [eax], 0
je 0x1000e351
push eax
lea eax, [ebp - 4]
push eax
push ebx
call fcn.1000e0b0
add esp, 0xc
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1000e364
mov ecx, dword [ebp - 4]
push dword [ebp + 0xc]
mov dword [ebp - 8], ecx
lea ecx, [ebp - 8]
push ecx
push eax
jmp 0x1000e359
push dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
push ebx
call fcn.1000e13b
add esp, 0xc
mov dword [ebp + 0x14], eax
push dword [ebp - 0x18]
call fcn.1000e636
cmp dword [ebp - 0xc], 0
pop ecx
je 0x1000e4dd
xor eax, eax
push ebx
mov dword [ebp - 0xc], eax
call fcn.10031620
pop ecx
xor edx, edx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], eax
cmp ecx, edx
je 0x1000e3d8
cmp dword [ebp + 0x14], edx
jne 0x1000e397
mov dword [ebp + 0x14], ecx
push dword [ebp + 0x10]
call esi
mov edi, eax
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp - 8]
add edi, eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 8]
push edi
lea eax, [eax + ebx + 1]
push eax
push dword [ebp - 8]
call fcn.1000e4fb
add esp, 0xc
push dword [ebp + 0x10]
call esi
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call fcn.10031990
add esp, 0xc
xor esi, esi
jmp 0x1000e476
cmp dword [ebp - 0x14], edx
jne 0x1000e3f0
mov ecx, dword [ebp + 8]
cmp ecx, edx
je 0x1000e3f0
cmp byte [ecx], 0
mov dword [ebp - 0x14], 1
jne 0x1000e3f3
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 4]
cmp ecx, edx
jne 0x1000e400
lea ecx, [eax + ebx]
mov dword [ebp - 4], ecx
mov al, byte [ecx]
push dword [ebp + 0xc]
mov byte [ebp + 0x17], al
call esi
push dword [ebp + 0x10]
mov edi, eax
call esi
cmp dword [ebp - 0x14], 0
lea edi, [edi + eax + 3]
je 0x1000e424
push dword [ebp + 8]
call esi
lea edi, [edi + eax + 4]
mov eax, dword [ebp - 0x18]
push edi
sub eax, dword [ebp - 4]
lea eax, [eax + ebx + 1]
push eax
push dword [ebp - 4]
call fcn.1000e4fb
add esp, 0xc
xor esi, esi
cmp dword [ebp - 0x14], esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
je 0x1000e45d
push dword [ebp + 8]
push str._r_n__s__r_n_s_s
push dword [ebp - 4]
call fcn.10033b69
add esp, 0x14
jmp 0x1000e46d
push str._r_n_s_s
push dword [ebp - 4]
call fcn.10033b69
add esp, 0x10
mov eax, dword [ebp - 4]
mov cl, byte [ebp + 0x17]
mov byte [edi + eax], cl
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
add edi, eax
push edi
call fcn.1000e5dd
mov edi, eax
pop ecx
cmp edi, esi
pop ecx
je 0x1000e4dd
push 1
push dword [ebp - 0x1c]
push ebx
push edi
call fcn.1000e573
add esp, 0x10
push esi
push esi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x24]
push esi
push eax
push dword [ebp - 0x1c]
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000e4d6
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jne 0x1000e4d6
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0xc], 1
push edi
call fcn.1000e636
pop ecx
push ebx
call fcn.1000e636
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
pop esi
pop ebx
jmp 0x1000e4f6
xor eax, eax
pop edi
leave
ret 0x10