Function at 0x4051c0
Capabilities:
Hash data using sha1
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
push 0
push 0
push 0
push esi
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x258], esi
call dword [sym.imp.MSVCR120.dll__fseeki64]
push 0xa0
lea eax, [ebp - 0x174]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0x1c
lea eax, [ebp - 0x21c]
push 0xa0
push 0
push eax
call sub.MSVCR120.dll_memset
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
add esp, 0xc
movdqu xmmword [ebp - 0xd4], xmm0
mov eax, dword [eax + 4]
movdqu xmmword [ebp - 0xc4], xmm0
test eax, eax
je 0x4052df
cmp eax, 1
je 0x4052df
cmp eax, 2
jne 0x405285
test dword [ebx], 0x7effffe0
je 0x40530b
push str.ERROR:_Bad_header_flags__n
call dword [sym.imp.MSVCR120.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
cmp eax, 3
je 0x4052b3
cmp eax, 4
je 0x4052b3
push str.ERROR:_Unknown_version__n
call dword [sym.imp.MSVCR120.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
test dword [ebx], 0x7effffc0
je 0x40530b
push str.ERROR:_Bad_header_flags__n
call dword [sym.imp.MSVCR120.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
test dword [ebx], 0x7efffffe
je 0x40530b
push str.ERROR:_Bad_header_flags__n
call dword [sym.imp.MSVCR120.dll_printf]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.MSVCR120.dll_fread]
lea eax, [ebp - 0x174]
push esi
push 1
push 0xa0
push eax
call edi
push 0
push 0
push 0x90
push esi
call dword [sym.imp.MSVCR120.dll__fseeki64]
push esi
push 1
lea eax, [ebp - 0xc4]
push 0x10
push eax
call edi
push esi
push 1
lea eax, [ebp - 0xd4]
push 0x10
push eax
call edi
mov eax, dword [ebx]
add esp, 0x40
mov edi, dword [sym.imp.MSVCR120.dll_printf]
mov esi, eax
and esi, 8
shl esi, 0x19
or esi, 2
mov dword [ebp - 0x274], esi
test eax, eax
jns 0x40538a
or esi, 0x1000000
cmp byte [ebp + 0x10], 0
mov dword [ebp - 0x274], esi
je 0x40538a
push str.DEBUG_data_detected__n
call edi
add esp, 4
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0xd4]
push eax
push dword [ebp - 0x270]
lea eax, [ebp - 0x1c]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x48]
mov edx, 1
push eax
push 0xa0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x174]
push eax
xor eax, eax
cmp dword [ecx + 4], 4
mov ecx, esi
sete al
push eax
movdqu xmmword [ebp - 0x48], xmm0
movdqu xmmword [ebp - 0x1c], xmm0
call fcn.004045b0
add esp, 0x20
test al, al
jne 0x405416
cmp byte [ebp + 0x10], al
je 0x4053ee
push str.WARNING:_Header_hash_is_invalid__n
call edi
add esp, 4
test dword [ebx], 0x80000000
jne 0x405416
push str.ERROR:_RAP_RIF_KLIC_key_is_invalid__n
call edi
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx]
mov eax, ecx
and eax, 1
jne 0x405427
lea edi, [eax + 0x10]
test cl, 0x20
je 0x40542c
mov edi, 0x20
test eax, eax
je 0x405445
cmp byte [ebp + 0x10], 0
je 0x405445
mov eax, dword [sym.imp.MSVCR120.dll_printf]
push str.COMPRESSED_data_detected__n
call eax
add esp, 4
mov eax, dword [ebx + 4]
mov esi, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
cdq
add esi, eax
push edx
adc ecx, edx
add esi, 0xffffffff
push eax
adc ecx, 0xffffffff
push ecx
push esi
call fcn.0040b560
mov dword [ebp - 0x25c], eax
mov esi, 0x100
imul eax, edi
xor ebx, ebx
push eax
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x278], eax
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [ebp - 0x264], eax
push dword [ebp - 0x260]
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
mov dword [ebp - 0x26c], eax
add esp, 4
mov eax, dword [ebp - 0x260]
test eax, eax
jle 0x40551f
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x268], eax
lea esp, [esp]
push 0
push ebx
push esi
push dword [ebp - 0x258]
call dword [sym.imp.MSVCR120.dll__fseeki64]
push dword [ebp - 0x258]
push 1
push edi
push dword [ebp - 0x268]
call dword [sym.imp.MSVCR120.dll_fread]
mov eax, dword [ebp - 0x27c]
add esp, 0x20
mov ecx, dword [ebp - 0x278]
add dword [ebp - 0x268], edi
sub ecx, edi
mov dword [ebp - 0x278], ecx
test byte [eax], 0x20
je 0x40550e
mov eax, dword [eax + 4]
add eax, edi
jmp 0x405510
mov eax, edi
cdq
add esi, eax
adc ebx, edx
test ecx, ecx
jg 0x4054c0
mov eax, dword [ebp - 0x260]
lea ecx, [ebp - 0xc4]
mov edx, 1
push ecx
push dword [ebp - 0x270]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x48]
push ecx
mov ecx, dword [ebp + 8]
push eax
push dword [ebp - 0x26c]
xor eax, eax
cmp dword [ecx + 4], 4
push dword [ebp - 0x264]
mov ecx, dword [ebp - 0x274]
sete al
push eax
call fcn.004045b0
mov edi, dword [sym.imp.MSVCR120.dll_printf]
add esp, 0x20
test al, al
jne 0x40557a
cmp byte [ebp + 0x10], al
je 0x40557a
push str.WARNING:_Metadata_section_hash_is_invalid__n
call edi
add esp, 4
mov ebx, dword [ebp - 0x27c]
test dword [ebx], 0x80000000
jne 0x4059a5
push str.Checking_signatures..._n
call edi
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
sub esp, 0xc
movq qword [ebp - 0x94], xmm0
movdqu xmmword [ebp - 0xb4], xmm0
mov dword [ebp - 0x28], 0
movdqu xmmword [ebp - 0xa4], xmm0
mov byte [ebp - 0x24], 0
movdqu xmmword [ebp - 0x8c], xmm0
mov dword [ebp - 0x10], 0
movdqu xmmword [ebp - 0x7c], xmm0
mov byte [ebp - 0xc], 0
movq qword [ebp - 0x6c], xmm0
movdqu xmmword [ebp - 0x4c], xmm0
mov dword [ebp - 0x54], 0
movdqu xmmword [ebp - 0x38], xmm0
mov byte [ebp - 0x50], 0
movdqu xmmword [ebp - 0x20], xmm0
movdqu xmmword [ebp - 0x64], xmm0
call fcn.00404160
call fcn.00404250
mov esi, dword [ebp - 0x258]
push 0
push 0
push 0xb0
push esi
call dword [sym.imp.MSVCR120.dll__fseeki64]
push esi
push 1
lea eax, [ebp - 0xb4]
push 0x28
push eax
call dword [sym.imp.MSVCR120.dll_fread]
push 0
push 0
push 0xd8
push esi
call dword [sym.imp.MSVCR120.dll__fseeki64]
add esp, 0x40
lea eax, [ebp - 0x8c]
push esi
push 1
push 0x28
push eax
call dword [sym.imp.MSVCR120.dll_fread]
movdqu xmm0, xmmword [ebp - 0xb4]
mov eax, dword [ebp - 0xa4]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x27], eax
lea edx, [ebp - 0x64]
mov eax, dword [ebp - 0x90]
add esp, 0x10
movdqu xmmword [ebp - 0x37], xmm0
mov dword [ebp - 0xf], eax
mov esi, 0x11
movdqu xmm0, xmmword [ebp - 0xa0]
movdqu xmmword [ebp - 0x1f], xmm0
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4056a1
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405690
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x4056c8
cmp esi, 0xfffffffd
je 0x4056c4
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4056c8
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4056c8
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x4056c8
xor eax, eax
jmp 0x4056cd
sbb eax, eax
or eax, 1
test eax, eax
je 0x4057ed
lea ecx, [ebp - 0x20]
mov esi, 0x11
lea edx, [ebp - 0x64]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4056f1
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4056e0
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x405718
cmp esi, 0xfffffffd
je 0x405714
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x405718
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x405718
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x405718
xor eax, eax
jmp 0x40571d
sbb eax, eax
or eax, 1
test eax, eax
je 0x4057ed
test byte [ebx], 0x20
je 0x405783
mov edi, dword [ebp - 0x25c]
shl edi, 4
push edi
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov esi, eax
push 0
push 0
push 0x100
push dword [ebp - 0x258]
call dword [sym.imp.MSVCR120.dll__fseeki64]
push dword [ebp - 0x258]
push 1
push edi
push esi
call dword [sym.imp.MSVCR120.dll_fread]
lea eax, [ebp - 0x4c]
mov edx, edi
push eax
mov ecx, esi
call fcn.0040a500
add esp, 0x24
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov edi, dword [sym.imp.MSVCR120.dll_printf]
jmp 0x405798
mov edx, dword [ebp - 0x260]
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0x264]
push eax
call fcn.0040a500
add esp, 4
lea eax, [ebp - 0x4c]
lea edx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00403e60
add esp, 8
test eax, eax
jne 0x4057e6
push str.Metadata_signature_is_invalid__n
call edi
mov eax, dword [ebx + 4]
add esp, 4
cdq
mov esi, eax
mov ecx, edx
mov eax, dword [ebp - 0x25c]
cdq
push edx
push eax
push ecx
push esi
call fcn.0040b500
cmp edx, 1
jb 0x4057f7
ja 0x4057df
test eax, eax
je 0x4057f7
push str.Due_to_large_file_size__metadata_signature_status_may_be_incorrect__n
jmp 0x4057f2
push str.Metadata_signature_is_valid__n
jmp 0x4057f2
push str.Metadata_signature_is_invalid__n
call edi
add esp, 4
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x38]
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0
movdqu xmmword [ebp - 0x38], xmm0
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x64]
movdqu xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x10], 0
mov esi, 0x11
movdqu xmm0, xmmword [ebp - 0x8c]
mov dword [ebp - 0x27], eax
mov eax, dword [ebp - 0x68]
movdqu xmmword [ebp - 0x37], xmm0
mov byte [ebp - 0xc], 0
movdqu xmm0, xmmword [ebp - 0x78]
mov dword [ebp - 0xf], eax
movdqu xmmword [ebp - 0x1f], xmm0
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40585f
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405848
mov al, byte [ecx]
cmp al, byte [edx]
je 0x405887
lea ecx, [ebp - 0x20]
mov esi, 0x11
lea edx, [ebp - 0x64]
lea ebx, [ebx]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x405893
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405870
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x405893
push str.Header_signature_is_invalid__n
call edi
jmp 0x4059a2
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
push 0xd8
movdqu xmmword [ebp - 0x4c], xmm0
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
mov ebx, dword [ebp - 0x258]
add esp, 4
mov esi, eax
mov dword [ebp - 0x25c], esi
push 0
push 0
push 0
push ebx
call dword [sym.imp.MSVCR120.dll__fseeki64]
push ebx
push 1
push 0xd8
push esi
call dword [sym.imp.MSVCR120.dll_fread]
mov edi, 0xd8
mov dword [ebp - 0x250], 0
add esp, 0x20
mov dword [ebp - 0x24c], 0x67452301
mov dword [ebp - 0x248], 0xefcdab89
mov ebx, 3
mov dword [ebp - 0x244], 0x98badcfe
mov dword [ebp - 0x240], 0x10325476
mov dword [ebp - 0x23c], 0xc3d2e1f0
mov dword [ebp - 0x254], edi
lea esp, [esp]
mov edx, esi
lea ecx, [ebp - 0x254]
call fcn.00409160
add esi, 0x40
sub edi, 0x40
dec ebx
jne 0x405930
test edi, edi
je 0x40595b
push edi
lea eax, [ebp - 0x238]
push esi
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0x254]
call fcn.0040a330
push dword [ebp - 0x25c]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea eax, [ebp - 0x4c]
lea edx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00403e60
add esp, 8
test eax, eax
mov eax, dword [sym.imp.MSVCR120.dll_printf]
je 0x40599b
push str.Header_signature_is_valid__n
jmp 0x4059a0
push str.Header_signature_is_invalid__n
call eax
add esp, 4
push dword [ebp - 0x264]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
push dword [ebp - 0x26c]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.0040abe5
mov esp, ebp
pop ebp
ret