Function at 0x502010
Capabilities:
Encode data using xor
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x599e16
mov eax, dword fs:[0]
push eax
sub esp, 0x2e0
mov eax, dword [0x601018]
xor eax, esp
mov dword [esp + 0x2d8], eax
push ebx
push esi
push edi
mov eax, dword [0x601018]
xor eax, esp
push eax
lea eax, [esp + 0x2f0]
mov dword fs:[0], eax
mov edi, ecx
push 0x30
lea eax, [edi + 0x80]
push 0
push eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x4c], eax
call sub.MSVCR100.dll_memset
mov eax, dword [edi + 0x7c]
add esp, 0xc
mov dword [edi + 0xc0], 0
cmp eax, 0x50
jae 0x50209b
push 0
push eax
push 8
push str.ERROR_11829:_attempt_to_read_block_header_of___d__bytes_at___016I64X___inside_compressed_file_header
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
mov eax, dword [edi + 0x58]
mov edx, dword [eax + 0x34]
lea ebx, [edi + 0x58]
mov ecx, ebx
call edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
test edx, edx
jg 0x5020db
jl 0x5020ba
test eax, eax
jae 0x5020db
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
push eax
push str.ERROR_11825:_unable_to_determine_the_size_of_the_compressed_file__error___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 8
jmp 0x502a29
mov esi, dword [edi + 0x7c]
xor ecx, ecx
cmp esi, eax
jne 0x5020ed
cmp ecx, edx
jne 0x5020ef
jmp 0x502a29
cmp ecx, edx
jg 0x50298b
jl 0x5020ff
cmp esi, eax
ja 0x50298b
xor eax, eax
cmp eax, edx
jg 0x50298b
jl 0x502118
lea eax, [esi + 8]
cmp eax, dword [esp + 0x24]
ja 0x50298b
mov eax, dword [ebx]
mov edx, dword [eax + 0x38]
push 0
push ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x40], ecx
push esi
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
jne 0x502330
mov edi, edi
mov eax, dword [ebx]
mov edx, dword [eax + 0x28]
push 8
lea ecx, [esp + 0x2cc]
push ecx
mov ecx, ebx
call edx
mov dword [esp + 0x18], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
jne 0x502401
mov eax, dword [esp + 0x18]
test eax, eax
je 0x502a29
cmp eax, 8
jne 0x502428
movzx ecx, byte [esp + 0x2cb]
movzx eax, byte [esp + 0x2ca]
movzx edx, byte [esp + 0x2c9]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x2c8]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x2ce]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x2cf]
shl eax, 8
or eax, edx
movzx edx, byte [esp + 0x2cd]
shl eax, 8
or eax, edx
movzx edx, byte [esp + 0x2cc]
shl eax, 8
or eax, edx
mov edx, ecx
shr edx, 0x18
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x3c], edx
cmp edx, 0xff
je 0x50244c
cmp edx, 0xfd
je 0x502a29
cmp edx, 0xfc
jne 0x502357
cmp byte [edi + 0x81], 0
jne 0x502a29
mov edx, dword [ebx]
mov edx, dword [edx + 0x28]
mov dword [edi + 0x90], eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0x8c], eax
push 4
lea eax, [esp + 0x2d4]
push eax
mov ecx, ebx
mov byte [edi + 0x81], 1
mov dword [edi + 0x88], esi
mov dword [esp + 0x1c], 1
call edx
mov esi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
jne 0x502456
cmp esi, 4
jne 0x50247d
lea edx, [esp + 0x2ca]
mov ecx, 0x811c9dc5
mov dword [esp + 0x18], 5
mov eax, edx
movzx esi, byte [eax + 1]
movzx eax, byte [eax]
shl esi, 8
or esi, eax
xor ecx, esi
add edx, 2
imul ecx, ecx, 0x1000193
dec dword [esp + 0x18]
jne 0x502285
movzx eax, cx
movzx ecx, byte [esp + 0x2c9]
shl cx, 8
movzx edx, cx
movzx ecx, byte [esp + 0x2c8]
or edx, ecx
mov dword [esp + 0x2c], eax
cmp eax, edx
jne 0x50249d
movzx esi, byte [esp + 0x2d3]
movzx edx, byte [esp + 0x2d2]
movzx eax, byte [esp + 0x2d1]
movzx ecx, byte [esp + 0x2d0]
shl esi, 8
or esi, edx
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x1c]
shl esi, 8
or esi, ecx
shr eax, 0x10
xor edx, edx
xor ecx, ecx
and eax, 0xff
or ecx, eax
mov eax, dword [ebx]
push edx
or esi, edx
mov edx, dword [eax + 0x38]
push ecx
mov dword [esp + 0x40], ecx
push esi
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
je 0x502140
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
mov ecx, dword [edi + 0x7c]
push eax
push 0
push ecx
push str.ERROR_11840:_unable_to_seek_to_compressed_block_at___016I64X___code___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
cmp edx, 0xfe
jne 0x5023da
cmp byte [edi + 0x81], 0
je 0x502a29
cmp dword [esp + 0x14], 0
mov dword [edi + 0xa0], eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0x98], esi
mov dword [edi + 0x9c], eax
je 0x502a29
mov eax, dword [ebx]
mov edx, dword [eax + 0x28]
push 0xc
lea ecx, [esp + 0x2d4]
push ecx
mov ecx, ebx
call edx
mov esi, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
je 0x5024b4
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
push eax
mov eax, dword [edi + 0x7c]
push 0
push eax
push str.ERROR_11867:_unable_to_read_relocation_target_header___016I64X___code___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
mov dword [edi + 0x88], esi
mov esi, dword [esp + 0x38]
mov dword [edi + 0x90], eax
mov dword [edi + 0x8c], esi
cmp edx, 0xfb
jl 0x50257b
jmp 0x502a29
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
mov ecx, dword [edi + 0x7c]
push eax
push 0
push ecx
push str.ERROR_11820:_unable_to_read_compressed_block_header_at___016I64X___code___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
mov edx, dword [esp + 0x18]
mov eax, dword [edi + 0x7c]
push 8
push edx
push 0
push eax
push str.ERROR_11821:_unable_to_read_complete_compressed_block_header_at___016I64X___returned_only___d__of___d__bytes
mov ecx, 0x610240
call fcn.00504670
add esp, 0x14
jmp 0x502a29
mov eax, 2
jmp 0x502a2e
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
mov ecx, dword [edi + 0x7c]
push eax
push 0
push ecx
push str.ERROR_11865:_unable_to_read_relocation_pointer___016I64X___code___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
mov edx, dword [edi + 0x7c]
push 4
push esi
push 0
push edx
push str.ERROR_11866:_unable_to_read_complete_relocation_pointer___016I64X___returned_only___d__of___d__bytes
mov ecx, 0x610240
call fcn.00504670
add esp, 0x14
jmp 0x502a29
push str.ERROR_11886:_Relocation_pointer_hash_mismatch
mov ecx, 0x610240
call fcn.00504670
add esp, 4
jmp 0x502a29
cmp esi, 0xc
je 0x5024d9
mov ecx, dword [edi + 0x7c]
push 8
push esi
push 0
push ecx
push str.ERROR_11868:_unable_to_read_complete_relocation_target_header___016I64X___returned_only___d__of___d__bytes
mov ecx, 0x610240
call fcn.00504670
add esp, 0x14
jmp 0x502a29
lea ecx, [esp + 0x2ca]
mov edx, 0x811c9dc5
mov dword [esp + 0x14], 9
lea ecx, [ecx]
movzx eax, byte [ecx + 1]
movzx esi, byte [ecx]
shl eax, 8
or eax, esi
xor edx, eax
add ecx, 2
imul edx, edx, 0x1000193
dec dword [esp + 0x14]
jne 0x5024f0
movzx eax, byte [esp + 0x2d7]
movzx ecx, byte [esp + 0x2d5]
shl eax, 8
mov dword [esp + 0x2c], edx
movzx edx, byte [esp + 0x2d6]
or eax, edx
movzx edx, byte [esp + 0x2d4]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x2da]
shl eax, 8
or eax, edx
movzx edx, byte [esp + 0x2d9]
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x2db]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x2d8]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
cmp dword [0x61025c], 0
je 0x5025a4
mov edx, dword [edi + 0x7c]
push eax
mov eax, dword [edi + 0x78]
push ecx
push edx
push eax
push str.read_block___016I64X__uncompressed___d__compressed___d_
mov ecx, 0x610240
call fcn.00504670
mov eax, dword [esp + 0x34]
add esp, 0x14
cmp byte [edi + 0x81], 0
jne 0x502704
lea ecx, [eax + 8]
mov dword [esp + 0x14], ecx
cmp ecx, dword [edi + 0x34]
jle 0x502704
lea ecx, [esp + 0x4c]
mov dword [esp + 0x44], ecx
xor ecx, ecx
mov eax, 1
push 0x2e30
push str.ERROR__d:
lea esi, [esp + 0x4c]
mov dword [esp + 0x50], 0x100
mov dword [esp + 0x15c], eax
mov dword [esp + 0x154], ecx
mov dword [esp + 0x158], ecx
mov byte [esp + 0x168], cl
mov dword [esp + 0x160], eax
mov dword [esp + 0x164], 0x2e30
call fcn.00506600
add esp, 8
push str.block_is_larger_than_the_maximum_specified_in_the_compressed_file_header
mov eax, esi
mov byte [esp + 0x164], 0
call fcn.00506660
mov edx, dword [esp + 0x14]
push edx
push str.size
push str._s___d_
mov dword [esp + 0x304], 1
call fcn.00506600
mov eax, dword [edi + 0x34]
add esp, 0xc
push eax
push str.maximum
push str._s___d_
call fcn.00506600
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, ebx
call edx
test eax, eax
je 0x502688
cmp byte [eax], 0
je 0x502688
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
mov eax, dword [edi + 0x78]
mov edi, dword [edi + 0x7c]
push edi
push eax
push str.offset
push str._s__0x_016I64X_
lea esi, [esp + 0x54]
call fcn.00506600
add esp, 0x10
mov dword [esp + 0x2f8], 0xffffffff
cmp dword [esp + 0x154], 0
je 0x5026e5
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x14c]
push eax
push ecx
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
mov dword [esp + 0x154], 0
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x4c]
cmp eax, edx
je 0x502a29
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
jmp 0x502a29
mov edx, dword [esp + 0x28]
mov edi, dword [edi + 0x7c]
xor ecx, ecx
lea esi, [edi + eax + 8]
cmp ecx, edx
jl 0x502744
jg 0x50271d
cmp esi, dword [esp + 0x24]
jbe 0x502744
mov ecx, dword [esp + 0x24]
push edx
push ecx
xor edx, edx
add edi, 8
adc edx, edx
push edx
push edi
push eax
push str.ERROR_11827:_attempt_to_read_block_of___d__bytes_at___016I64X___extends_past_end_of_file___016I64X_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x18
jmp 0x502a29
mov esi, dword [esp + 0x30]
lea edi, [eax + 8]
lea ecx, [esi + 0xb0]
call fcn.00503810
test eax, eax
jne 0x502a29
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0xb4], edi
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xa8], ecx
mov edx, ecx
shr edx, 8
mov byte [eax + 1], dl
mov byte [eax], cl
mov edx, ecx
shr edx, 0x10
mov byte [eax + 2], dl
shr ecx, 0x18
mov byte [eax + 3], cl
mov ecx, dword [esp + 0x20]
mov edx, ecx
shr edx, 8
mov byte [eax + 5], dl
mov edx, ecx
shr edx, 0x10
mov byte [eax + 6], dl
mov edx, ecx
shr edx, 0x18
mov byte [eax + 4], cl
mov byte [eax + 7], dl
lea edi, [eax + 8]
mov eax, dword [ebx]
mov edx, dword [eax + 0x28]
push ecx
push edi
mov ecx, ebx
call edx
mov dword [esp + 0x18], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
test eax, eax
je 0x5027f1
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
push eax
mov eax, dword [esi + 0x7c]
push 0
push eax
push str.ERROR_11822:_unable_to_read_compressed_block_at___016I64X___code___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0x10
jmp 0x502a29
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x50281c
mov ecx, dword [esi + 0x7c]
push ebx
push eax
push 0
push ecx
push str.ERROR_11823:_unable_to_read_complete_compressed_block_at___016I64X___returned_only___d__or___d__bytes
mov ecx, 0x610240
call fcn.00504670
add esp, 0x14
jmp 0x502a29
cmp dword [esp + 0x3c], 0xfe
jne 0x50286c
mov eax, dword [esp + 0x2c]
mov edx, ebx
mov ecx, edi
call fcn.00500670
movzx edx, byte [esp + 0x2c9]
shl dx, 8
movzx ecx, dx
movzx edx, byte [esp + 0x2c8]
and eax, 0xffff
or ecx, edx
cmp eax, ecx
je 0x50286c
push str.ERROR_11887:_Target_relocated_block_hash_mismatch
mov ecx, 0x610240
call fcn.00504670
add esp, 4
jmp 0x502a29
mov edi, dword [esp + 0x1c]
lea eax, [ebx + 8]
add dword [esi + 0x6c], eax
mov eax, dword [esi + 0x34]
cmp edi, eax
jbe 0x502896
push eax
push edi
push str.ERROR_11830:_detected_compressed_block_size___d__is_greater_than_the_maximum_size___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
jmp 0x502a29
cmp edi, 4
jae 0x5028b5
push 4
push edi
push str.ERROR_11831:_detected_compressed_block_size___d__is_less_than_the_minimum_size___d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
jmp 0x502a29
test byte [esi + 0x2c], 0x10
je 0x5028d8
cmp edi, ebx
je 0x5028d8
push ebx
push edi
push str.ERROR_11817:_no_compression_but_the_values_of_uncompressed_size___d__and_compressed_size___d__are_not_same
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
jmp 0x502a29
lea ecx, [esi + 0xbc]
call fcn.00503810
test eax, eax
jne 0x502a29
mov dword [esi + 0xc0], edi
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x10]
mov ebx, dword [esi + 0xbc]
add eax, 8
test ecx, ecx
jne 0x50290c
mov ecx, 0xf
mov edx, dword [esi + 0x2c]
test dl, 0x10
je 0x502921
push edi
push eax
push ebx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
jmp 0x50294f
test dl, 4
je 0x502931
push edi
push ebx
mov ecx, eax
call fcn.0051f270
jmp 0x50294c
test dl, 2
je 0x502943
push ecx
push edi
push ebx
call fcn.0051f980
add esp, 0xc
jmp 0x50294f
push eax
push ebx
mov ecx, edi
call fcn.00501b00
add esp, 8
lea esi, [ebx + edi]
mov ecx, ebx
call fcn.00503010
test eax, eax
jne 0x50297d
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 0x7c]
push eax
push edx
push str.ERROR_11850:_detected_invalid_page_chain_in_compressed_block_at___016I64X_
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
jmp 0x502a29
mov eax, dword [esp + 0x40]
mov byte [eax], 1
xor eax, eax
jmp 0x502a2e
push str.attempt_to_read_block_header_at_specified_offset__extends_past_end_of_file
mov eax, 0x2e32
lea ecx, [esp + 0x188]
call fcn.005064b0
mov esi, eax
mov dword [esp + 0x2f8], 0
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
test eax, eax
je 0x5029ce
cmp byte [eax], 0
je 0x5029ce
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
push 8
push str.read_header_bytes
push str._s___d_
call fcn.00506600
mov edi, dword [edi + 0x7c]
add esp, 0xc
xor eax, eax
push eax
push edi
push str.offset__0x_016I64X_
call fcn.00506600
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
add esp, 0xc
push ecx
push edx
push str.file_size
push str._s__0x_016I64X_
call fcn.00506600
add esp, 0x10
lea esi, [esp + 0x184]
mov dword [esp + 0x2f8], 0xffffffff
call fcn.00506520
mov eax, 1
mov ecx, dword [esp + 0x2f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d8]
xor ecx, esp
call fcn.00596083
mov esp, ebp
pop ebp
ret