Function at 0x1006e4b0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x98
cmp byte [edx + 0x81], 0
mov esi, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
je 0x1006e52a
mov edi, dword [edx + 0x70]
lea esi, [edi - 1]
sub edi, 1
jb 0x1006edea
mov ebx, dword [edx + 0x68]
test ebx, ebx
je 0x1006edea
shl esi, 7
add esi, ebx
lea eax, [esp + 0x38]
push esi
push eax
call fcn.101dc440
add esp, 8
mov edx, dword [esp + 0x38]
cmp edx, 4
jne 0x1006ec1b
mov edx, dword [esp + 8]
cmp byte [edx + 0x82], 0
je 0x1006e713
mov esi, dword [esp + 4]
mov word [edx + 0x81], 0
lea ebx, [edx + 0x20]
sub esp, 4
mov edi, edx
lea ecx, [esp + 0x3c]
mov edx, ebx
push 0
push 0
call fcn.1006d140
add esp, 0xc
mov eax, dword [esp + 0x38]
cmp eax, 4
jne 0x1006e6fe
mov eax, edi
lea edi, [esp + 0x38]
mov ecx, 0x12
mov dword [esp + 0x80], ebx
mov esi, ebx
lea edx, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x20], 2
mov esi, dword [esp + 0x38]
cmp esi, 3
jne 0x1006ee00
mov ebx, dword [esp + 0x3c]
lea edi, [eax + 0x24]
mov ecx, eax
mov dword [esp + 0x34], edi
mov edi, dword [esp + 4]
test ebx, ebx
mov dword [esp + 0x90], ebx
je 0x1006e867
mov eax, dword [edx + 0x18]
movsd xmm0, qword [edx + 0x10]
movsd xmm2, qword [edx]
movsd xmm1, qword [edx + 8]
mov dword [esp + 0x84], esi
mov dword [esp + 0x28], eax
movsd qword [esp + 0x20], xmm0
movsd qword [esp + 0x18], xmm1
movsd qword [esp + 0x10], xmm2
mov eax, dword [esp + 0x18]
mov esi, eax
cmp eax, 0xb
jbe 0x1006edd5
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], esi
shr eax, 0x18
mov dword [esp + 0x2c], ecx
mov byte [ecx + 0xb], al
xor eax, eax
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
nop
mov esi, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
movzx eax, byte [esi + eax]
movzx esi, dl
mov byte [esp], al
mov eax, edx
shr edx, 8
or eax, 3
mov ebx, eax
and ebx, 0xfffffffe
imul ebx, eax
mov eax, ecx
shr ecx, 8
xor al, byte [esp]
xor bh, byte [esp]
movzx eax, al
xor ecx, dword [eax*4 + 0x10449d20]
movzx eax, cl
add eax, edi
imul edi, eax, 0x8088405
inc edi
mov eax, edi
shr eax, 0x18
xor esi, eax
mov eax, dword [esp + 0x2c]
xor edx, dword [esi*4 + 0x10449d20]
mov esi, dword [esp + 0xc]
mov byte [eax + esi], bh
inc esi
cmp dword [esp + 0x30], esi
mov eax, esi
jne 0x1006e600
mov dword [esp + 0x28], edx
lea edx, [esp + 0x1c]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edi
lea ecx, [esp + 0x88]
push dword [esp + 0x30]
mov eax, dword [esp + 0x30]
mov edi, eax
push eax
call fcn.1006c310
add esp, 8
movzx eax, byte [esp + 0x88]
mov ebx, dword [esp + 0x80]
cmp eax, 4
jne 0x1006e936
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x14], 0
je 0x1006e6c1
mov eax, dword [0x1044eff8]
push edi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov edi, dword [esp + 4]
mov ecx, ebx
call fcn.10070930
mov ecx, dword [esp + 8]
mov dword [ecx + 0x20], 3
mov dword [ecx + 0x24], 0
mov dword [ecx + 0x28], esi
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x38], 3
je 0x1006e8dc
lea ecx, [esp + 0x38]
call fcn.10070930
jmp 0x1006e8f6
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [esi], eax
mov dword [esi + 8], edx
mov dword [esi + 4], ecx
jmp 0x1006ec2f
cmp dword [edx + 0x20], 3
jne 0x1006ee50
cmp dword [edx + 0x24], 0
jne 0x1006ee50
shl edi, 7
lea eax, [edx + 0x28]
lea ecx, [esp + 0x38]
mov dword [esp + 0x2c], eax
mov edx, eax
push dword [ebx + edi + 0x5c]
push dword [ebx + edi + 0x54]
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x38]
cmp cl, 4
jne 0x1006e9b6
lea eax, [ebx + edi + 0x30]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
add ecx, dword [eax + 0x2c]
mov dword [esp], ecx
adc edx, 0
mov ecx, dword [esp + 8]
mov dword [esp + 0xc], edx
mov edx, dword [esp]
mov dword [ecx + 0x10], edx
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov dword [ecx + 0x14], edx
mov ecx, dword [esp]
mov dword [eax + 4], edx
mov dword [eax], ecx
movzx edx, byte [ebx + edi + 0x78]
mov eax, dword [eax + 0x2c]
mov ecx, dword [ebx + edi + 0x20]
mov byte [esp + 0x34], dl
mov edx, dword [esp + 8]
mov dword [esp + 0x80], eax
mov eax, dword [ebx + edi + 0x24]
add ecx, 0x1c
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov edx, dword [edx + 0x28]
adc eax, 0
mov dword [esp + 0x30], edx
push 0
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
push dword [esp + 0x40]
call sub.KERNEL32.dll_SetFilePointerEx
test eax, eax
je 0x1006eaba
mov ecx, dword [esp + 0x80]
cmp byte [esp + 0x34], 0
lea eax, [ecx + 0x14]
cmove eax, ecx
mov word [esp + 0x10], ax
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
lea eax, [esp + 0x10]
push 2
push eax
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x38]
cmp cl, 4
jne 0x1006e9b6
mov eax, dword [esp + 0xc]
mov dword [esp + 0x44], eax
mov eax, dword [esp]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x30]
lea eax, [esp + 0x18]
push eax
call fcn.101662a0
add esp, 0xc
cmp dword [esp + 0x10], 0
je 0x1006ebed
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
jmp 0x1006eac1
mov eax, dword [edx + 0x18]
movsd xmm0, qword [edx + 0x10]
movsd xmm2, qword [edx]
movsd xmm1, qword [edx + 8]
mov dword [esp + 0x28], eax
movsd qword [esp + 0x20], xmm0
movsd qword [esp + 0x18], xmm1
movsd qword [esp + 0x10], xmm2
mov ebx, dword [esp + 0x80]
mov ecx, ebx
call fcn.10070930
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 8]
movsd xmm0, qword [esp + 0x20]
movsd xmm2, qword [esp + 0x10]
movsd xmm1, qword [esp + 0x18]
mov dword [ebx], 3
mov dword [esi + 0x18], eax
movsd qword [esi + 0x10], xmm0
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm2
cmp dword [esp + 0x38], 3
jne 0x1006e6f0
cmp dword [esp + 0x90], 0
je 0x1006e8fa
cmp dword [esp + 0x3c], 0
jne 0x1006e8fa
push dword [esp + 0x40]
call sub.KERNEL32.dll_CloseHandle
mov ecx, dword [esp + 8]
cmp dword [ebx], 3
lea edx, [esp + 0x38]
jne 0x1006ee20
cmp dword [esi], 0
jne 0x1006ee20
cmp byte [ecx + 0x83], 0
je 0x1006e9da
mov byte [ecx + 0x80], 0
mov byte [ecx + 0x83], 0
mov dword [edi], 4
jmp 0x1006ec2f
mov dword [esp], eax
mov eax, dword [esp + 0x8c]
movzx esi, byte [esp + 0x8b]
movzx ebx, word [esp + 0x89]
mov dword [esp + 0xc], eax
push dword [esp + 0x1c]
call sub.KERNEL32.dll_CloseHandle
shl esi, 0x10
or ebx, esi
cmp dword [esp + 0x14], 0
je 0x1006e978
mov eax, dword [0x1044eff8]
push edi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
shl ebx, 8
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
add ebx, dword [esp]
cmp dword [esp + 0x38], 3
mov dword [eax], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
jne 0x1006ea9d
cmp dword [esp + 0x3c], 0
jne 0x1006ec2f
push dword [esp + 0x40]
call sub.KERNEL32.dll_CloseHandle
jmp 0x1006ec2f
movzx edx, byte [esp + 0x3f]
movzx eax, word [esp + 0x3d]
mov esi, dword [esp + 0x39]
movzx ecx, cl
shl edx, 0x10
or eax, edx
shld eax, esi, 8
shl esi, 8
or ecx, esi
jmp 0x1006eac1
mov ebx, dword [ecx + 0x70]
sub ebx, 1
jb 0x1006eaab
mov esi, dword [ecx + 0x68]
test esi, esi
je 0x1006eaab
mov eax, dword [ecx + 4]
shl ebx, 7
mov dword [esi + ebx + 0x6c], eax
movsd xmm0, qword [ecx + 0x18]
movsd qword [esi + ebx + 0x18], xmm0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov eax, dword [ecx + 0x28]
push 1
push edx
push 0
push 0
push eax
mov edi, ecx
call sub.KERNEL32.dll_SetFilePointerEx
test eax, eax
je 0x1006eac8
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp], eax
sub eax, dword [edi + 0x10]
mov dword [esp + 0x2c], ecx
sbb ecx, dword [edi + 0x14]
mov dword [esi + ebx + 0x10], eax
add edi, 0x28
mov dword [esi + ebx + 0x14], ecx
mov eax, dword [esi + ebx + 0x20]
mov ecx, dword [esi + ebx + 0x24]
add eax, 0xe
adc ecx, 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
lea eax, [esp + 0x38]
lea ecx, [esp + 0x10]
push eax
push edi
push ecx
call fcn.101662a0
add esp, 0xc
cmp dword [esp + 0x10], 0
je 0x1006eae6
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
jmp 0x1006ec56
lea ecx, [esp + 0x38]
call fcn.10070930
jmp 0x1006ec2f
mov eax, dword [esp + 4]
mov dword [eax], 4
jmp 0x1006ec2f
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
xor edx, edx
jmp 0x1006ec23
call sub.KERNEL32.dll_GetLastError
mov edi, dword [esp + 4]
mov dword [edi], 0
mov dword [edi + 8], eax
mov dword [edi + 4], 0
jmp 0x1006ec2f
lea eax, [esi + ebx + 0x6c]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov edx, edi
lea edi, [esp + 0x38]
mov ecx, edi
mov dword [esp + 0xc], edx
push 4
lea eax, [esp + 0x14]
push eax
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x38]
cmp cl, 4
jne 0x1006ec37
cmp byte [esi + ebx + 0x78], 0
lea eax, [esi + ebx + 0x18]
je 0x1006ec68
mov dword [esp + 0x30], eax
lea eax, [esi + ebx + 0x20]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add ecx, dword [esi + ebx + 0x44]
adc eax, 0
add ecx, 0x22
adc eax, 0
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
push edi
mov esi, dword [esp + 0x10]
push esi
lea ebx, [esp + 0x18]
push ebx
call fcn.101662a0
add esp, 0xc
cmp dword [esp + 0x10], 0
jne 0x1006ea90
mov eax, dword [esp + 0x30]
movsd xmm0, qword [eax]
movsd qword [esp + 0x38], xmm0
lea ecx, [esp + 0x10]
mov edx, esi
push 8
push edi
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x10]
mov eax, edi
mov edi, dword [esp + 4]
cmp cl, 4
jne 0x1006ebd5
mov ecx, dword [esp + 0x30]
movsd xmm0, qword [ecx - 8]
movsd qword [esp + 0x38], xmm0
lea ecx, [esp + 0x10]
mov edx, esi
push 8
push eax
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x10]
cmp cl, 4
je 0x1006ed58
movzx edx, byte [esp + 0x17]
movzx eax, word [esp + 0x15]
shl edx, 0x10
or eax, edx
mov edx, dword [esp + 0x11]
jmp 0x1006edc4
mov eax, dword [esp + 8]
lea edx, [eax + 0x20]
lea ecx, [esp + 0x38]
push dword [esi + 4]
push dword [esi]
push dword [ebx + edi + 0x38]
call fcn.1006d140
add esp, 0xc
mov edx, dword [esp + 0x38]
cmp edx, 4
jne 0x1006ec1b
mov edx, dword [esp + 8]
jmp 0x1006e51d
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 4]
mov dword [esi], edx
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx edx, byte [esp + 0x3f]
movzx eax, word [esp + 0x3d]
mov esi, dword [esp + 0x39]
movzx ecx, cl
shl edx, 0x10
or eax, edx
shld eax, esi, 8
shl esi, 8
or ecx, esi
mov edi, dword [esp + 4]
mov dword [edi], 0
mov dword [edi + 4], ecx
mov dword [edi + 8], eax
jmp 0x1006ec2f
cmp dword [eax - 4], 0
je 0x1006ed03
mov ebx, dword [0x1044f00c]
movzx eax, byte [ebx]
push 1
push 0x22
call fcn.10001510
add esp, 8
mov edi, dword [esp + 4]
test eax, eax
je 0x1006ee8c
mov esi, eax
push 0x22
push str.Large_file_option_has_not_been_set
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0x22
mov dword [esp + 0x40], 0x22
movzx eax, byte [ebx]
push 4
push 0xc
call fcn.10001510
add esp, 8
test eax, eax
je 0x1006ee9a
mov ecx, dword [esp + 0x40]
mov dword [eax + 8], ecx
movsd xmm0, qword [esp + 0x38]
movsd qword [eax], xmm0
push 0x103313bc
push eax
push 0x27
lea eax, [esp + 0x44]
push eax
call fcn.10166fa0
add esp, 0x10
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
jmp 0x1006ec5a
mov esi, eax
mov eax, dword [eax - 8]
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0xc]
lea ecx, [esp + 0x38]
mov edx, ebx
push 4
lea eax, [esp + 0x14]
push eax
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x38]
mov edi, dword [esp + 4]
cmp cl, 4
jne 0x1006edb1
mov eax, dword [esi]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x38]
mov edx, ebx
push 4
lea ebx, [esp + 0x14]
push ebx
call fcn.1006c310
add esp, 8
movzx ecx, byte [esp + 0x38]
cmp cl, 4
jne 0x1006edb1
mov ecx, dword [esp]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x10]
push ebx
call fcn.101662a0
add esp, 0xc
cmp dword [esp + 0x10], 0
mov ecx, dword [esp + 8]
je 0x1006e91d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [edi], 0
mov dword [edi + 8], ecx
mov dword [edi + 4], eax
jmp 0x1006ec2f
movzx edx, byte [esp + 0x3f]
movzx eax, word [esp + 0x3d]
shl edx, 0x10
or eax, edx
mov edx, dword [esp + 0x39]
shld eax, edx, 8
shl edx, 8
movzx ecx, cl
or ecx, edx
jmp 0x1006ec5a
push 0x103316f0
push esi
push 0xb
call fcn.100273d0
add esp, 0xc
jmp 0x1006eea6
push 0x1033161c
push 0x2b
push str.called__Option::unwrap____on_a__None__value_rustc_d5c2e9c342b358556da91d61ed4133f6f50fc0c3library_std_src_synconce.rs
call fcn.10027330
add esp, 0xc
ud2
mov dword [esp + 0x84], esi
push 0x1033160c
push 0x28
push str.internal_error:_entered_unreachable_code_
call fcn.10027330
add esp, 0xc
jmp 0x1006eea6
mov dword [esp + 0x38], str.Should_have_switched_to_stored_and_unencrypted_beforehand
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 0
mov dword [esp + 0x40], 0x103310dc
mov dword [esp + 0x44], 0
push 0x10331534
push edx
jmp 0x1006ee82
mov dword [esp + 0x38], str.Should_have_switched_to_stored_and_unencrypted_beforehand
mov dword [esp + 0x3c], 1
mov dword [esp + 0x48], 0
mov dword [esp + 0x40], 0x103310dc
mov dword [esp + 0x44], 0
push 0x10331534
lea eax, [esp + 0x3c]
push eax
call fcn.100272b0
add esp, 8
ud2
push 0x22
push 1
call fcn.1001ac80
add esp, 8
ud2
push 0xc
push 4
call fcn.1001ac80
add esp, 8
ud2