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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417f95
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x421008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x41a614
lea eax, [ebp - 0x10]
push str.item_proto
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
jne 0x40f115
push str.item_proto
push str.cannot_open__s_for_writing_n
jmp 0x40f498
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push eax
push 1
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x5850494d
push 4
push eax
call ebx
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 1
push 1
push 4
push eax
call ebx
push dword [ebp - 0x10]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0xb4
push 1
push 4
push eax
call ebx
push dword [ebp - 0x10]
mov eax, dword [0x423f18]
push 1
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push 4
push eax
call ebx
add esp, 0x40
mov word [ebp - 0x3c], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0
xor eax, eax
imul edi, dword [0x423f18], 0xb4
xor ebx, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], eax
mov eax, dword [0x423f24]
mov dword [ebp - 0x2c], eax
add edi, 0xffffff4c
mov dword [ebp - 0x38], ebx
add edi, dword [0x423f24]
mov ecx, edi
mov dword [ebp - 0x34], ebx
sub ecx, eax
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40f26e
cmp eax, 0x16c16c1
ja 0x40f4b2
imul esi, eax, 0xb4
cmp esi, 0x1000
jb 0x40f221
lea eax, [esi + 0x23]
cmp eax, esi
jbe 0x40f4b7
push eax
call fcn.00416a16
add esp, 4
test eax, eax
je 0x40f416
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x40f234
test esi, esi
je 0x40f232
push esi
call fcn.00416a16
add esp, 4
mov ebx, eax
jmp 0x40f234
xor ebx, ebx
lea eax, [esi + ebx]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
sub edi, eax
push edi
push eax
push ebx
call sub.VCRUNTIME140.dll_memmove
mov eax, 0xb60b60b7
add esp, 0xc
imul edi
add edx, edi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0xb4
add eax, ebx
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 1
imul edi, dword [0x423f18], 0xb4
mov eax, dword [0x423f24]
mov byte [ebp - 0x2c], 0
push dword [ebp - 0x2c]
lea esi, [edi + eax]
mov ecx, esi
sub ecx, eax
mov eax, 0xb60b60b7
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, esi
mov esi, dword [0x423f24]
mov ecx, esi
push eax
call fcn.004100e0
add esp, 8
lea eax, [ebp - 0x4c]
push 0x421030
push edi
push esi
push eax
call fcn.00415060
mov edi, dword [ebp - 0x4c]
test al, al
jne 0x40f2de
push str.cannot_compress_n
call fcn.0040b370
add esp, 4
jmp 0x40f3ca
cmp byte [ebp - 0x3c], 0
mov esi, dword [ebp - 0x44]
je 0x40f2fb
mov eax, dword [esi + 4]
test eax, eax
je 0x40f2f3
add eax, 0x14
jmp 0x40f2fe
mov eax, dword [esi + 8]
add eax, 0x14
jmp 0x40f2fe
mov eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi + 8]
push dword [esi + 0xc]
push dword [0x423f18]
push str.Elements__d_n_u___Compress_____u___Encrypt_____u__GetSize__u_n
call fcn.0040b370
add esp, 0x18
cmp byte [ebp - 0x3c], 0
je 0x40f335
mov eax, dword [esi + 4]
test eax, eax
je 0x40f32d
add eax, 0x14
jmp 0x40f338
mov eax, dword [esi + 8]
add eax, 0x14
jmp 0x40f338
mov eax, dword [esi + 0xc]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push 1
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push 4
push eax
call esi
push dword [ebp - 0x10]
push 1
push dword [ebp - 0x1c]
push edi
call esi
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x24
lea eax, [ebp - 0x10]
push 0x41a6b4
push str.item_proto
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
jne 0x40f38f
push str.Error___n
call fcn.0040b370
jmp 0x40f3d3
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push eax
push 1
lea eax, [ebp - 0x14]
push 4
push eax
call esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
push 1
push 4
push eax
call esi
xor eax, eax
cmp dword [ebp - 0x14], 0x5450494d
sete al
push eax
push dword [ebp - 0x18]
push str.Elements_Check__u_fourcc_match__d_n
call fcn.0040b370
add esp, 0x2c
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov byte [ebp - 4], 0
test ebx, ebx
je 0x40f426
mov ecx, dword [ebp - 0x20]
mov eax, 0xb60b60b7
sub ecx, ebx
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul ecx, eax, 0xb4
mov eax, ebx
cmp ecx, 0x1000
jb 0x40f41c
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f41c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push ebx
call fcn.00416a46
add esp, 8
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0x48]
test edi, edi
je 0x40f48e
cmp byte [ebp - 0x3b], 0
jne 0x40f48e
mov dword [ebp - 0x2c], edi
push esi
push edi
cmp esi, 0x10000
jae 0x40f478
push str.lzo.reuse_free_t_p__d__n
call fcn.0040b370
mov eax, dword [0x423f2c]
add esp, 0xc
cmp eax, dword [0x423f30]
je 0x40f46c
mov dword [eax], edi
add dword [0x423f2c], 4
jmp 0x40f48e
lea ecx, [ebp - 0x2c]
push ecx
push eax
call fcn.00415200
jmp 0x40f48e
push str.lzo.real_free_t_p__d__n
call fcn.0040b370
add esp, 0xc
push edi
call fcn.0041704d
add esp, 4
test esi, esi
je 0x40f4a0
push esi
push str.lzo.free__d_n
call fcn.0040b370
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0040b2f0
call fcn.00407d80
int3