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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x453075
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x478024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
test ebx, ebx
js 0x416782
cmp ebx, dword [edi + 0x7c]
jge 0x416782
mov esi, dword [edi + 0x78]
mov ecx, ebx
shl ecx, 5
add esi, ecx
mov dword [ebp - 0x1c], ecx
cmp byte [esi + 0x1c], 0
je 0x416147
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 4]
add eax, 0xfffffffc
cmp eax, 6
ja case.0x416159.6
movzx eax, byte [eax + 0x4167ac]
jmp dword [eax*4 + 0x4167a4]
mov eax, dword [edi + 0x70]
lea ecx, [edi + 0x70]
cmp dword [eax - 0xc], 0
jne 0x41616f
lea ecx, [edi + 0x68]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00407510
mov dword [ebp - 4], 0
cmp ebx, dword [edi + 0x7c]
jge 0x416782
mov eax, dword [edi + 0x78]
lea edx, [ebp - 0x18]
add eax, 0x18
lea ecx, [ebp - 0x14]
add eax, dword [ebp - 0x1c]
push eax
call fcn.00417a20
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x24]
mov eax, dword [esi + 0xc]
push dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
call fcn.00404120
mov byte [ebp - 4], 2
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x2c]
call fcn.00411ac0
mov byte [ebp - 4], 3
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete byte [ebp - 0xd]
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4161f6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416215
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x41623c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
mov ecx, edi
push eax
push 0x104
call fcn.00417580
mov edi, 0xe
jmp 0x416722
mov ecx, dword [ebp - 0x18]
push 0
push dword [ebp - 0x28]
call fcn.004283a0
add esp, 8
test al, al
jne 0x416340
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x416272
mov eax, dword [ecx]
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x18]
call dword [eax]
test eax, eax
jne 0x416340
cmp byte [0x479ee0], 0
je 0x416336
call fcn.00403950
mov ecx, eax
test ecx, ecx
je 0x41678e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 8
lea ecx, [ebp + 8]
push 0x26
push str.Not_enough_disk_space_to_extract_file:
call fcn.00403530
lea eax, [esi + 0x18]
push eax
lea edx, [ebp - 0x18]
lea ecx, [ebp + 0xc]
call fcn.00417a20
add esp, 4
mov byte [ebp - 4], 9
mov edx, dword [eax]
test edx, edx
je 0x4162e9
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4162d0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00403530
lea eax, [ebp + 8]
mov ecx, 0x479ea8
push eax
call fcn.00420c70
mov byte [ebp - 4], 8
or ebx, 0xffffffff
mov edx, dword [ebp + 0xc]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416318
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416336
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 0xa
jmp 0x416722
cmp ebx, dword [edi + 0x7c]
jge 0x416782
mov ecx, dword [edi + 0x78]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ecx + esi + 4]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
test ebx, ebx
je 0x41640e
mov eax, dword [ebx]
push 0
push dword [ecx + esi + 0xc]
mov ecx, ebx
call dword [eax + 0x1c]
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x7c]
jge 0x416782
mov eax, dword [edi + 0x78]
lea ecx, [ebp - 0x14]
push 4
push 0
mov eax, dword [eax + esi]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0xc]
push eax
call fcn.0040b990
mov byte [ebp - 4], 0xd
mov ecx, 0x465884
mov eax, dword [eax]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4163d6
test dx, dx
je 0x4163d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4163d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4163b0
xor esi, esi
jmp 0x4163db
sbb esi, esi
or esi, 1
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4163fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x28]
test esi, esi
push dword [ebp - 0x2c]
lea eax, [ecx + 8]
cmovne eax, ecx
mov ecx, ebx
push eax
call dword [ebp - 0x24]
cmp dword [ebp - 0x30], 0xc
jne 0x416423
lea eax, [ebp - 0x14]
lea ecx, [edi + 0xa4]
push eax
call fcn.0040b890
lea eax, [edi + 0xb0]
xor dl, dl
push eax
lea ecx, [ebp - 0x14]
call fcn.004118b0
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], 0x46552c
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 0xf
cmp eax, 0xffffffff
jne 0x416587
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
lea eax, [ebp - 0x14]
mov ecx, edi
push eax
push 0x104
call fcn.00417580
cmp byte [0x479ee0], 0
je 0x4165d9
call fcn.00403950
mov ecx, eax
test ecx, ecx
je 0x416798
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x12
lea ecx, [ebp + 8]
push 0x17
push str.Failed_to_extract_file:
call fcn.00403530
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4164e9
mov edx, eax
lea edi, [edx + 2]
nop dword [eax + eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4164d0
sub edx, edi
lea ecx, [ebp + 8]
sar edx, 1
push edx
push eax
call fcn.00403530
push 7
push str._Error:
lea ecx, [ebp + 8]
call fcn.00403530
push ecx
call esi
mov edx, eax
lea ecx, [ebp + 0xc]
call fcn.00422b10
add esp, 4
mov byte [ebp - 4], 0x13
mov edx, dword [eax]
test edx, edx
je 0x416530
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x416517
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp + 8]
call fcn.00403530
lea eax, [ebp + 8]
mov ecx, 0x479ea8
push eax
call fcn.00420c70
mov byte [ebp - 4], 0x12
or ebx, 0xffffffff
mov edx, dword [ebp + 0xc]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41655f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xf
mov eax, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4165d9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, 2
jmp 0x416702
mov esi, dword [ebp + 8]
cmp esi, dword [edi + 0x7c]
jge 0x416782
mov eax, dword [edi + 0x78]
add eax, dword [ebp - 0x1c]
push 0
mov ecx, dword [eax + 0x10]
xor eax, eax
add ecx, dword [edi + 0x58]
mov dword [ebp - 0x40], ecx
adc eax, dword [edi + 0x5c]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push ecx
push dword [edi + 0x88]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4165e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [edi + 0x60]
mov ecx, edi
push eax
push 0x103
call fcn.00417580
mov edi, 2
jmp 0x416702
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x24]
push 0x10000
call fcn.00417780
mov dword [edi + 0xd0], 0
cmp esi, dword [edi + 0x7c]
jge 0x416782
mov eax, dword [edi + 0x78]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x28], 0
mov ecx, dword [edx + eax + 8]
shr ecx, 1
and ecx, 0xffffff01
mov dword [ebp - 0x30], ecx
mov ecx, dword [edx + eax + 0xc]
mov dword [ebp + 0xc], ecx
test ebx, ebx
je 0x41664c
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x24]
call eax
test al, al
jne 0x416778
mov ecx, dword [ebp + 0xc]
mov eax, ecx
cmp ecx, 0x10000
mov ecx, 0x10000
push 0
cmova eax, ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
push dword [edi + 0x88]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4166d6
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4166d6
cmp byte [ebp - 0x30], 0
je 0x416691
push eax
lea ecx, [edi + 0xc8]
push esi
call fcn.004282b0
mov eax, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4166d6
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4166d6
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
sub ecx, eax
add edx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x28], edx
test ebx, ebx
je 0x4166ce
mov eax, dword [ebx]
mov ecx, ebx
push 0
push edx
call dword [eax + 0x20]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x416634
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x7c]
jge 0x416782
mov eax, dword [edi + 0x78]
add eax, dword [ebp - 0x1c]
xor edi, edi
mov byte [eax + 0x1c], 1
mov byte [ebp - 4], 0xf
push esi
call fcn.00438f5b
add esp, 4
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], 0x46552c
test eax, eax
je 0x416722
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x34], 0
mov byte [ebp - 4], 0
or ebx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x416743
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x416762
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, 0xf
jmp 0x4166ee
push 1
push 0xc000008c
call fcn.0040ce70
push 0x80004005
call fcn.00404020
push 0x80004005
call fcn.00404020
nop
pushal
popal
inc ecx
add byte [ecx + 0x41], ch
add byte [eax], al
add byte [ecx], al
add dword [ecx], eax
add byte [eax], al
int3