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

Disassembly:
sub esp, 0x2e0
mov eax, dword [esp + 0x2e4]
push ebp
push edi
lea ecx, [esp + 0xe0]
xor ebp, ebp
push eax
push ecx
mov dword [esp + 0x18], ebp
call fcn.10009560
add esp, 8
lea edx, [esp + 0xe0]
push ebp
push 0x80
push 3
push ebp
push 3
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x1000b7aa
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x10]
push ebp
mov ebx, 0x40
push eax
lea ecx, [esp + 0x70]
push ebx
push ecx
push edi
call esi
test eax, eax
je 0x1000b796
cmp dword [esp + 0x10], ebx
jne 0x1000b796
cmp word [esp + 0x68], 0x5a4d
jne 0x1000b796
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x1000b796
push ebp
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push edi
call ebp
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0xb0]
push ebx
push eax
push edi
call esi
test eax, eax
je 0x1000b792
cmp dword [esp + 0x10], ebx
jne 0x1000b792
cmp word [esp + 0xa8], 0x454e
jne 0x1000b792
mov eax, dword [esp + 0xcc]
cmp ax, word [esp + 0xce]
je 0x1000b792
mov edx, dword [esp + 0xa4]
and eax, 0xffff
push 0
add eax, edx
push 0
push eax
push edi
call ebp
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x38]
push 2
push edx
push edi
call esi
test eax, eax
je 0x1000b792
cmp dword [esp + 0x10], 2
jne 0x1000b792
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x28]
push 8
push ecx
push edi
call esi
test eax, eax
je 0x1000b792
cmp dword [esp + 0x10], 8
jne 0x1000b792
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov ax, word [esp + 0x20]
test ax, ax
je 0x1000b792
cmp ax, 0x8003
je 0x1000b633
mov eax, dword [esp + 0x22]
push 1
and eax, 0xffff
push 0
lea edx, [eax + eax*2]
shl edx, 2
push edx
push edi
call ebp
jmp 0x1000b772
mov eax, dword [esp + 0x22]
test ax, ax
mov dword [esp + 0x14], eax
jbe 0x1000b772
test ebx, ebx
jne 0x1000b792
lea eax, [esp + 0x10]
push ebx
push eax
lea ecx, [esp + 0x3c]
push 0xc
push ecx
push edi
call esi
test eax, eax
je 0x1000b758
cmp dword [esp + 0x10], 0xc
jne 0x1000b758
push 1
push ebx
push ebx
push edi
call ebp
mov edx, dword [esp + 0x34]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
mov cl, 0x10
and eax, 0xffff
mov esi, edx
sub cl, al
and esi, 0xffff
shr esi, cl
mov ecx, eax
mov ebx, dword [esp + 0x36]
shl edx, cl
push 0
push 0
shl esi, 0x10
and ebx, 0xffff
and edx, 0xffff
or esi, edx
push esi
push edi
shl ebx, cl
call ebp
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x48]
push 0x28
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push esi
push edi
call ebp
mov eax, dword [esp + 0x2f8]
mov ecx, dword [esp + 0x44]
cmp ecx, dword [eax + 4]
jne 0x1000b742
mov edx, dword [esp + 0x48]
mov ecx, dword [eax + 8]
cmp edx, ecx
jne 0x1000b742
mov cx, word [esp + 0x4c]
cmp cx, word [eax + 0xc]
jne 0x1000b742
mov dx, word [esp + 0x4e]
cmp dx, word [eax + 0xe]
jne 0x1000b742
mov esi, dword [esp + 0x2fc]
mov ecx, ebx
cmp ebx, esi
jb 0x1000b715
mov ecx, esi
lea edx, [esp + 0x2c]
push 0
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000b742
cmp ebx, esi
jb 0x1000b72f
mov ebx, esi
cmp dword [esp + 0x2c], ebx
jne 0x1000b742
mov eax, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
push 0
push 0
push eax
push edi
call ebp
mov ebx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
add eax, 0xffff
test ax, ax
mov dword [esp + 0x14], eax
ja 0x1000b644
test ebx, ebx
jne 0x1000b792
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x28]
push 8
push edx
push edi
call esi
test eax, eax
je 0x1000b792
cmp dword [esp + 0x10], 8
je 0x1000b603
mov ebp, dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
mov eax, ebp
pop edi
pop ebp
add esp, 0x2e0
ret
mov eax, ebp
pop edi
pop ebp
add esp, 0x2e0
ret