Function at 0x405c70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
mov dword [ebp - 0x1d0], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp + 0x10]
push 0x80
mov dword [ebp - 0x1d4], edx
mov dword [ebp - 0x1b8], ecx
mov dword [ebp - 0x1c0], eax
call esi
mov edi, eax
mov dword [ebp - 0x1c8], eax
add esp, 4
test edi, edi
je 0x405cdb
push 0x80
push 0
push edi
call sub.MSVCR120.dll_memset
add esp, 0xc
jmp 0x405ce3
xor edi, edi
mov dword [ebp - 0x1c8], edi
push 0x10
call esi
mov ebx, eax
mov dword [ebp - 0x1c4], eax
add esp, 4
test ebx, ebx
je 0x405cff
xorps xmm0, xmm0
movdqu xmmword [ebx], xmm0
jmp 0x405d07
xor ebx, ebx
mov dword [ebp - 0x1c4], ebx
push dword [ebp - 0x1b8]
mov esi, dword [sym.imp.MSVCR120.dll_fread]
lea eax, [ebp - 0xa8]
push 1
push 0x80
push eax
call esi
push dword [ebp - 0x1b8]
lea eax, [ebp - 0x24]
push 1
push 0x10
push eax
call esi
mov eax, dword [ebp - 0xa8]
mov dword [edi], eax
mov ecx, dword [ebp - 0xa4]
mov edx, ecx
sar edx, 8
mov eax, ecx
shr eax, 0x18
and edx, 0xff00
or edx, eax
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or edx, eax
mov dword [edi + 4], edx
mov ecx, dword [ebp - 0xa0]
mov edx, ecx
sar edx, 8
mov eax, ecx
shr eax, 0x18
and edx, 0xff00
or edx, eax
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or edx, eax
mov dword [edi + 8], edx
mov ecx, dword [ebp - 0x9c]
mov edx, ecx
sar edx, 8
mov eax, ecx
shr eax, 0x18
and edx, 0xff00
or edx, eax
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or edx, eax
lea eax, [edi + 0x60]
mov dword [edi + 0xc], edx
movdqu xmm0, xmmword [ebp - 0x98]
mov dword [ebp - 0x1cc], eax
movdqu xmmword [edi + 0x10], xmm0
movdqu xmm0, xmmword [ebp - 0x88]
movdqu xmmword [edi + 0x20], xmm0
movdqu xmm0, xmmword [ebp - 0x78]
movdqu xmmword [edi + 0x30], xmm0
movdqu xmm0, xmmword [ebp - 0x68]
movdqu xmmword [edi + 0x40], xmm0
movdqu xmm0, xmmword [ebp - 0x58]
movdqu xmmword [edi + 0x50], xmm0
movdqu xmm0, xmmword [ebp - 0x48]
movdqu xmmword [eax], xmm0
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.0040a7c0
mov dword [edi + 0x70], eax
mov dword [edi + 0x74], edx
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call fcn.0040a7c0
add esp, 0x30
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], edx
lea ecx, [ebp - 0x1b4]
mov eax, dword [edi]
mov dword [ebp - 0x1b4], 0x44504e
cmp eax, dword [ecx]
je 0x405e68
push str.ERROR:_File_has_invalid_NPD_header.
call dword [sym.imp.MSVCR120.dll_printf]
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x24]
mov edx, ecx
sar edx, 8
mov eax, ecx
shr eax, 0x18
and edx, 0xff00
or edx, eax
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or edx, eax
mov dword [ebx], edx
mov ecx, dword [ebp - 0x20]
mov edx, ecx
sar edx, 8
mov eax, ecx
shr eax, 0x18
and edx, 0xff00
or edx, eax
mov eax, ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
shl eax, 8
or edx, eax
mov dword [ebx + 4], edx
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.0040a7c0
mov esi, dword [sym.imp.MSVCR120.dll_printf]
push str.NPD_HEADER_n
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
call esi
add esp, 0xc
push dword [edi + 4]
push str.NPD_version:__d_n
call esi
push dword [edi + 8]
push str.NPD_license:__d_n
call esi
push dword [edi + 0xc]
push str.NPD_type:__x_n
call esi
lea eax, [edi + 0x10]
push eax
push str.NPD_content_ID:__s_n
call esi
push 0x40c150
call esi
add esp, 0x24
xorps xmm0, xmm0
test dword [ebx], 0x1000000
movdqu xmmword [ebp - 0x14], xmm0
je 0x405f6e
push str.SDAT_HEADER_n
call esi
add esp, 4
push dword [ebx]
push str.SDAT_flags:_0x_08X_n
call esi
push dword [ebx + 4]
push str.SDAT_block_size:_0x_08X_n
call esi
push dword [ebx + 0xc]
push dword [ebx + 8]
push str.SDAT_file_size:_0x_llX_n
call esi
add esp, 0x1c
push 0x40c150
call esi
mov edx, dword [ebp - 0x1cc]
lea ecx, [ebp - 0x14]
push 0x40e190
call fcn.0040a860
add esp, 8
jmp 0x406088
push str.EDAT_HEADER_n
call esi
add esp, 4
push dword [ebx]
push str.EDAT_flags:_0x_08X_n
call esi
push dword [ebx + 4]
push str.EDAT_block_size:_0x_08X_n
call esi
push dword [ebx + 0xc]
push dword [ebx + 8]
push str.EDAT_file_size:_0x_llX_n
call esi
add esp, 0x1c
push 0x40c150
call esi
mov ecx, dword [ebp - 0x1d0]
lea edx, [ebp - 0x1b0]
add esp, 4
call fcn.0040ab80
push dword [ebp + 0x14]
mov edx, dword [ebp - 0x1bc]
lea ecx, [ebp - 0x1b0]
push edi
call fcn.004059e0
add esp, 8
test eax, eax
jne 0x405ff7
test dword [ebx], 0x80000000
jne 0x405ff7
push str.ERROR:_NPD_hash_validation_failed__n
call esi
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
mov eax, ecx
and eax, 3
cmp al, 3
jne 0x406108
mov eax, dword [ebp - 0x1bc]
movdqu xmm0, xmmword [eax]
movdqu xmmword [ebp - 0x14], xmm0
cmp byte [ebp + 0x14], 0
je 0x4060c0
push str.DEVKLIC:
call esi
mov ebx, dword [ebp - 0x1bc]
add esp, 4
xor edi, edi
movzx eax, byte [ebx + edi]
push eax
push str._02X
call esi
inc edi
add esp, 8
cmp edi, 0x10
jl 0x406032
push 0x40c150
call esi
add esp, 4
push str.RIF_KEY:
call esi
mov ebx, dword [ebp - 0x1c4]
add esp, 4
xor edi, edi
mov eax, dword [ebp - 0x1c0]
movzx eax, byte [eax + edi]
push eax
push str._02X
call esi
inc edi
add esp, 8
cmp edi, 0x10
jl 0x406063
push 0x40c150
call esi
add esp, 4
cmp byte [ebp + 0x14], 0
je 0x4060c0
push str.DECRYPTION_KEY:
call esi
add esp, 4
xor edi, edi
lea ebx, [ebx]
movzx eax, byte [ebp + edi - 0x14]
push eax
push str._02X
call esi
inc edi
add esp, 8
cmp edi, 0x10
jl 0x4060a0
push 0x40c784
call esi
add esp, 4
push str.Parsing_data..._n
call esi
mov edi, dword [ebp - 0x1c8]
lea ecx, [ebp - 0x14]
add esp, 4
mov edx, ebx
push dword [ebp + 0x14]
push dword [ebp - 0x1b8]
push edi
call fcn.004051c0
add esp, 0xc
test eax, eax
je 0x406150
push str.Parsing_failed__n
call esi
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
test cl, 3
je 0x406016
mov eax, dword [ebp - 0x1c0]
movdqu xmm0, xmmword [eax]
xor eax, eax
movdqu xmmword [ebp - 0x14], xmm0
cmp byte [ebp + eax - 0x14], 0
jne 0x406016
inc eax
cmp eax, 0x10
jl 0x406122
push str.ERROR:_A_valid_RAP_RIF_file_is_needed_for_this_EDAT_file_
call esi
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
push str.File_successfully_parsed__n
call esi
add esp, 4
push 0x40c150
call esi
add esp, 4
push str.Decrypting_data..._n
call esi
mov edx, dword [ebp - 0x1d4]
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x1b8]
add esp, 4
push dword [ebp + 0x14]
push eax
push edi
push ebx
call fcn.00404a60
add esp, 0x10
test eax, eax
je 0x4061ac
push str.Decryption_failed_
call esi
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040abe5
mov esp, ebp
pop ebp
ret
push str.File_successfully_decrypted__n
call esi
mov esi, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
push edi
call esi
add esp, 4
push ebx
call esi
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor al, al
pop edi
pop esi
pop ebx
call fcn.0040abe5
mov esp, ebp
pop ebp
ret