Function at 0x40c2e4
Capabilities:
Check if file exists
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [ebp + 8]
push ebx
lea ebx, [edi + 0x78]
push esi
mov ecx, ebx
mov dword [esp + 0x10], ebx
call fcn.0040de50
mov esi, eax
cmp byte [esi + 0x1c], 0
je 0x40c312
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
mov ecx, ebx
call fcn.0040de50
mov eax, dword [eax + 4]
mov ecx, edi
call fcn.0040d601
mov eax, dword [eax]
sub eax, 0x10
call fcn.00409c7d
mov ecx, dword [esp + 0x10]
mov ebx, eax
mov eax, dword [ebp + 8]
add ebx, 0x10
mov dword [esp + 0x14], ebx
call fcn.0040de50
add eax, 0x18
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
call fcn.00408dbc
mov eax, dword [esi + 0xc]
pop ecx
mov dword [esp + 0x30], eax
push ebx
lea eax, [esp + 0x28]
call fcn.0040455c
lea eax, [esp + 0x24]
lea ecx, [esp + 0x20]
call fcn.0040a814
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
mov eax, dword [esp + 0x20]
dec ebx
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.00404645
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404645
test bl, bl
jne 0x40c3db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x10]
push eax
push 0x104
push edi
call fcn.0040d5c4
push 0xe
pop esi
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
call fcn.00404645
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.00404645
mov eax, esi
jmp 0x40c30a
mov ecx, dword [esp + 0x14]
xor ebx, ebx
push ebx
push dword [esp + 0x34]
call fcn.00421a98
pop ecx
pop ecx
test al, al
jne 0x40c46c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40c40c
mov eax, dword [ecx]
push ebx
push dword [esp + 0x34]
push dword [esp + 0x1c]
call dword [eax]
test eax, eax
jne 0x40c46c
cmp byte [0x45ae9c], bl
je 0x40c465
add esi, 0x18
push esi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x24]
call fcn.00408dbc
pop ecx
push dword [eax]
lea eax, [esp + 0x28]
push str.Not_enough_disk_space_to_extract_file:
call fcn.00416c8f
push eax
call fcn.00416ca0
push eax
call fcn.00416ca0
push eax
mov eax, 0x45ae6c
call fcn.0041601d
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404645
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.00404645
push 0xa
jmp 0x40c3bb
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
call fcn.0040de50
cmp dword [eax + 4], 0xc
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
sete byte [esp + 0xb]
mov dword [esp + 0x24], esi
test esi, esi
je 0x40c4c9
mov ebx, dword [esi]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
add ebx, 0x1c
call fcn.0040de50
push 0
push dword [eax + 0xc]
mov ecx, esi
call dword [ebx]
mov ebx, dword [esi]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
add ebx, 0x14
call fcn.0040de50
push dword [eax]
lea eax, [esp + 0x10]
call fcn.0040a509
push eax
mov ecx, esi
call dword [ebx]
cmp byte [esp + 0xb], 0
je 0x40c4e3
lea esi, [edi + 0xa4]
lea ebx, [esp + 0xc]
call fcn.00409680
mov esi, dword [esp + 0x24]
lea eax, [edi + 0xb0]
push eax
xor ebx, ebx
lea eax, [esp + 0x10]
push ebx
push eax
call fcn.0040a6a7
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x30], eax
cmp eax, 0xffffffff
jne 0x40c5b1
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
lea eax, [esp + 0x10]
push eax
push 0x104
push edi
call fcn.0040d5c4
cmp byte [0x45ae9c], bl
je 0x40c5a2
call esi
push eax
lea eax, [esp + 0x24]
call fcn.00422593
pop ecx
push dword [eax]
lea eax, [esp + 0x28]
push str._Error:
push dword [esp + 0x14]
push str.Failed_to_extract_file:
call fcn.00416c8f
push eax
call fcn.00416ca0
push eax
call fcn.00416ca0
push eax
call fcn.00416ca0
push eax
call fcn.00416ca0
push eax
mov eax, 0x45ae6c
call fcn.0041601d
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
call fcn.00404645
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.00404645
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
jmp 0x40c3bb
mov eax, dword [edi + 0x5c]
mov ecx, dword [esp + 0x10]
mov ebx, dword [edi + 0x58]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
call fcn.0040de50
mov eax, dword [eax + 0x10]
xor ecx, ecx
add eax, ebx
adc ecx, dword [esp + 0x2c]
xor ebx, ebx
push ebx
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x44], ecx
mov ecx, dword [edi + 0x84]
push eax
push ecx
mov dword [esp + 0x48], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40c617
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [edi + 0x60]
push eax
push 0x103
push edi
call fcn.0040d5c4
cmp dword [esp + 0x30], ebx
je 0x40c5aa
push dword [esp + 0x30]
jmp 0x40c5a4
push 0x10000
call fcn.004318aa
pop ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
mov dword [edi + 0xd0], ebx
call fcn.0040de50
mov ebx, dword [eax + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
shr ebx, 1
and bl, 1
call fcn.0040de50
mov eax, dword [eax + 0xc]
and dword [esp + 0x24], 0
mov dword [esp + 0x20], eax
test esi, esi
je 0x40c66b
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
test al, al
jne 0x40c731
mov ecx, dword [esp + 0x20]
mov eax, 0x10000
cmp ecx, eax
jbe 0x40c67a
mov ecx, eax
mov eax, dword [edi + 0x84]
push 0
lea edx, [esp + 0x20]
push edx
push ecx
push dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c6fc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c6fc
test bl, bl
je 0x40c6b2
mov edx, dword [esp + 0x18]
lea ecx, [edi + 0xc8]
call fcn.004249f5
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c6fc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40c6fc
sub dword [esp + 0x20], eax
add dword [esp + 0x24], eax
test esi, esi
je 0x40c6f1
mov eax, dword [esp + 0x24]
cdq
push edx
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
cmp dword [esp + 0x20], 0
jg 0x40c658
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
call fcn.0040de50
push dword [esp + 0x18]
mov byte [eax + 0x1c], 1
call fcn.004318b5
xor esi, esi
pop ecx
cmp dword [esp + 0x30], esi
je 0x40c3bc
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c3bc
push dword [esp + 0x18]
call fcn.004318b5
cmp dword [esp + 0x34], 0
pop ecx
je 0x40c74c
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xf
jmp 0x40c3bb