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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x30
mov eax, dword [ebp + 8]
push ebx
push esi
lea esi, [edi + 0x6c]
mov ecx, esi
mov dword [esp + 0x14], esi
call fcn.0046cfe9
mov ebx, eax
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x24], ebx
je 0x46b6ac
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
mov ecx, esi
call fcn.0046cfe9
mov eax, dword [eax + 4]
mov ecx, edi
call fcn.0046c8ee
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00425ecf
mov eax, dword [ebp + 8]
mov ecx, esi
call fcn.0046cfe9
add eax, 0x18
push eax
lea eax, [esp + 0x14]
push eax
lea esi, [esp + 0x20]
call fcn.00468fa3
mov esi, dword [ebx + 0xc]
pop ecx
pop ecx
push dword [esp + 0x18]
lea eax, [esp + 0x2c]
push eax
call fcn.004046e4
lea ecx, [esp + 0x28]
call fcn.0045e0e0
mov bl, al
neg bl
sbb bl, bl
lea ecx, [esp + 0x28]
inc bl
call fcn.00402907
test bl, bl
je 0x46b74c
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
push 0x104
push edi
mov ebx, eax
call fcn.0046c8b5
push 0xe
pop esi
lea ecx, [esp + 0x10]
call fcn.00402907
lea ecx, [esp + 0x18]
call fcn.00402907
mov eax, esi
jmp 0x46b6a4
mov ecx, dword [esp + 0x18]
xor ebx, ebx
push ebx
push esi
call fcn.0047d3cb
pop ecx
pop ecx
test al, al
jne 0x46b7d8
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x46b777
mov eax, dword [ecx]
push ebx
push esi
push dword [esp + 0x20]
call dword [eax]
test eax, eax
jne 0x46b7d8
cmp byte [0x523354], bl
je 0x46b7d1
mov eax, dword [esp + 0x24]
add eax, 0x18
push eax
lea eax, [esp + 0x28]
push eax
lea esi, [esp + 0x20]
call fcn.00468fa3
pop ecx
pop ecx
push dword [eax]
lea eax, [esp + 0x2c]
push str.Not_enough_disk_space_to_extract_file:
push eax
call fcn.00474809
push eax
call fcn.00474819
push eax
call fcn.00474819
push eax
mov eax, 0x523324
call fcn.00473bef
lea ecx, [esp + 0x28]
call fcn.00402907
lea ecx, [esp + 0x24]
call fcn.00402907
push 0xa
jmp 0x46b732
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
call fcn.0046cfe9
cmp dword [eax + 4], 0xc
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
sete byte [esp + 0xf]
xor ebx, ebx
mov dword [esp + 0x28], esi
cmp esi, ebx
je 0x46b839
mov ebx, dword [esi]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
add ebx, 0x1c
call fcn.0046cfe9
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 + 0x14]
add ebx, 0x14
call fcn.0046cfe9
push dword [eax]
lea ecx, [esp + 0x14]
call fcn.0045d8d0
push eax
mov ecx, esi
call dword [ebx]
xor ebx, ebx
cmp byte [esp + 0xf], 0
je 0x46b855
lea esi, [edi + 0x9c]
lea ebx, [esp + 0x10]
call fcn.0045b3f0
mov esi, dword [esp + 0x28]
xor ebx, ebx
lea eax, [edi + 0xa8]
push eax
push ebx
lea ecx, [esp + 0x18]
call fcn.0045dce0
pop ecx
pop ecx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x30], eax
cmp eax, 0xffffffff
jne 0x46b91e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
lea ecx, [esp + 0x10]
push ecx
push 0x104
push edi
mov ebx, eax
call fcn.0046c8b5
cmp byte [0x523354], 0
je 0x46b90f
call esi
lea ecx, [esp + 0x24]
push ecx
mov ebx, eax
call fcn.0045c1f0
pop ecx
push dword [eax]
lea eax, [esp + 0x2c]
push str._Error:
push dword [esp + 0x18]
push str.Failed_to_extract_file:
push eax
call fcn.00474809
push eax
call fcn.00474819
push eax
call fcn.00474819
push eax
call fcn.00474819
push eax
call fcn.00474819
push eax
mov eax, 0x523324
call fcn.00473bef
lea ecx, [esp + 0x28]
call fcn.00402907
lea ecx, [esp + 0x24]
call fcn.00402907
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
jmp 0x46b732
mov eax, dword [edi + 0x78]
mov ecx, dword [esp + 0x14]
push ebx
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
push ebx
call fcn.0046cfe9
mov eax, dword [eax + 0x10]
add eax, dword [edi + 0x8c]
push eax
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x46b970
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [edi + 0x54]
push ecx
push 0x103
push edi
mov ebx, eax
call fcn.0046c8b5
cmp dword [esp + 0x30], 0
je 0x46b917
push dword [esp + 0x30]
jmp 0x46b911
push 0x10000
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], ebx
call fcn.00441691
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
mov dword [edi + 0xc8], ebx
call fcn.0046cfe9
mov ebx, dword [eax + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
shr ebx, 1
and bl, 1
call fcn.0046cfe9
mov eax, dword [eax + 0xc]
and dword [esp + 0x28], 0
mov dword [esp + 0x24], eax
test esi, esi
je 0x46b9c8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
test al, al
jne 0x46ba8b
mov ecx, dword [esp + 0x24]
mov eax, 0x10000
cmp ecx, eax
jbe 0x46b9d7
mov ecx, eax
mov eax, dword [edi + 0x78]
push 0
lea edx, [esp + 0x24]
push edx
push ecx
push dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46ba56
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46ba56
test bl, bl
je 0x46ba0c
mov edx, dword [esp + 0x1c]
lea ecx, [edi + 0xc0]
call fcn.0047e8f5
push 0
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x28]
push dword [esp + 0x28]
push dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46ba56
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46ba56
sub dword [esp + 0x24], eax
add dword [esp + 0x28], eax
test esi, esi
je 0x46ba4b
mov eax, dword [esp + 0x28]
cdq
push edx
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
cmp dword [esp + 0x24], 0
jg 0x46b9b5
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
call fcn.0046cfe9
push dword [esp + 0x1c]
mov byte [eax + 0x1c], 1
call fcn.004af6b2
xor esi, esi
pop ecx
cmp dword [esp + 0x30], esi
je 0x46b733
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x46b733
push dword [esp + 0x1c]
call fcn.004af6b2
cmp dword [esp + 0x34], 0
pop ecx
je 0x46baa6
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xf
jmp 0x46b732