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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x804c
call fcn.10030df0
mov eax, dword [0x100525d4]
xor eax, esp
mov dword [esp + 0x8048], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push edi
call ebx
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x10012107
push edi
push str.Decompress_error_file_open_failed:__s_n
mov ecx, 3
call fcn.10011b40
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8048]
xor ecx, esp
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push esi
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1001215a
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push str.Decompress_error_failed_create_destination_file:__s_n
mov ecx, 3
call fcn.10011b40
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8048]
xor ecx, esp
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8
push 0x38
lea ecx, [esp + 0x1c]
push 0
push ecx
call fcn.10023380
add esp, 0xc
mov eax, str.1.2.3
lea ecx, [esp + 0x18]
call fcn.1003da60
test eax, eax
je 0x100121a9
push eax
push str.Decompress_error_failed_inflateInit:__d_n
mov ecx, 3
call fcn.1000d790
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8048]
xor ecx, esp
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8
push 0x3fff
lea edx, [esp + 0x55]
push 0
push edx
mov dword [esp + 0x20], 0
mov byte [esp + 0x5c], 0
call fcn.10023380
add esp, 0xc
push 0x3fff
lea eax, [esp + 0x4055]
push 0
push eax
mov byte [esp + 0x405c], 0
call fcn.10023380
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x4000
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100122b4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x100122b4
lea ecx, [esp + 0x50]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
lea edx, [esp + 0x4050]
push 2
push eax
mov dword [esp + 0x30], 0x4000
mov dword [esp + 0x2c], edx
call fcn.1003c4e0
mov esi, eax
add esp, 8
cmp esi, 0xfffffffc
jl 0x10012260
cmp esi, 0xfffffffd
jle 0x100122e9
cmp esi, 2
je 0x100122e9
mov edi, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x18]
push ecx
mov esi, 0x4000
sub esi, edi
push esi
lea edx, [esp + 0x405c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x14], esi
jne 0x10012356
test edi, edi
je 0x10012225
mov edx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x18]
push eax
push 0x4000
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1001220d
lea esi, [esp + 0x18]
call fcn.1003c300
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8048]
xor ecx, esp
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8
mov edi, dword [esp + 0x34]
test edi, edi
je 0x1001231a
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x1001231a
mov eax, dword [edi + 0x34]
test eax, eax
je 0x1001230f
push eax
mov eax, dword [esp + 0x44]
push eax
call ecx
mov ecx, dword [esp + 0x44]
add esp, 8
mov edx, dword [esp + 0x40]
push edi
push edx
call ecx
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call edi
mov eax, dword [esp + 0x10]
push eax
call edi
push esi
push str.Decompress_error:__d_n
mov ecx, 3
call fcn.1000d790
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8048]
xor ecx, esp
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8
lea esi, [esp + 0x18]
call fcn.1003c300
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov ecx, dword [esp + 0x8054]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.1001d39b
mov esp, ebp
pop ebp
ret 8