Function at 0x10065760
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
and esp, 0xfffffff8
sub esp, 0x5bc
mov eax, dword [0x100e6018]
xor eax, esp
mov dword [esp + 0x5b8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
cmp dword [ebx + 0x14], 0
push esi
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], eax
je 0x100657af
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x100657d1
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebp + 0x14]
xor eax, eax
mov dword [esp + 0x1c], eax
cmp dword [ebx], eax
je 0x100657ed
mov edx, 0xc
cmp edi, 4
cmovne eax, edx
mov dword [esp + 0x1c], eax
push ecx
lea eax, [esp + 0x3bc]
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_wcscpy_s]
add esp, 0xc
cmp word [esp + 0x3b8], 0
je 0x10065f40
lea eax, [esp + 0x3b8]
mov ecx, 0x2f
nop
cmp word [eax], 0x5c
jne 0x10065829
mov word [eax], cx
add eax, 2
cmp word [eax], 0
jne 0x10065820
cmp edi, 4
sete dl
mov byte [esp + 0x13], dl
test dl, dl
je 0x1006586f
lea ecx, [esp + 0x3b8]
lea esi, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10065850
sub ecx, esi
sar ecx, 1
mov byte [esp + 0x12], 1
cmp word [esp + ecx*2 + 0x3b6], 0x2f
jne 0x10065874
mov byte [esp + 0x12], 0
mov esi, 8
mov dword [esp + 0x20], esi
test dl, dl
jne 0x10065891
lea ecx, [esp + 0x3b8]
call fcn.10064980
test al, al
je 0x10065897
xor esi, esi
mov dword [esp + 0x20], esi
cmp edi, 2
jne 0x100658a9
push dword [esp + 0x14]
mov ecx, ebx
call fcn.100650c0
jmp 0x100658df
cmp edi, 1
jne 0x100658bc
push ecx
push dword [esp + 0x18]
mov ecx, ebx
call fcn.10065170
jmp 0x100658df
cmp edi, 3
jne 0x100658cf
push ecx
push dword [esp + 0x18]
mov ecx, ebx
call fcn.100652e0
jmp 0x100658df
cmp edi, 4
jne 0x10065f40
mov ecx, ebx
call fcn.10065350
test eax, eax
jne 0x10065f45
mov edi, dword [sym.imp.MSVCR110.dll_strcpy_s]
push 0x100b375e
mov dword [esp + 0x388], eax
lea eax, [esp + 0x64]
push 0x104
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x170]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x3cc]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x170]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10065940
sub ecx, edx
mov dword [esp + 0x40], ecx
cmp byte [esp + 0x12], al
je 0x10065972
push 0x100b7830
lea eax, [esp + 0x174]
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_strcat_s]
add esp, 0xc
inc dword [esp + 0x40]
push 0x100b375e
lea eax, [esp + 0x278]
push 0x104
push eax
call edi
xor eax, eax
mov word [esp + 0x5e], ax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0x3c], eax
add esp, 0xc
cmp dword [ebx], 0
mov eax, 8
mov dword [esp + 0x16c], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x378], 1
mov dword [esp + 0x380], 0
mov dword [esp + 0x28], 0x140b17
mov dword [esp + 0x34], 0
mov word [esp + 0x2c], ax
je 0x100659f0
cmp byte [esp + 0x13], 0
jne 0x100659f0
mov eax, 9
mov word [esp + 0x2c], ax
mov word [esp + 0x54], ax
mov word [esp + 0x2e], si
test esi, esi
jne 0x10065a11
mov ecx, dword [ebx + 0x70]
test ecx, ecx
js 0x10065a11
mov eax, dword [esp + 0x1c]
add eax, ecx
mov dword [esp + 0x38], eax
jmp 0x10065a19
mov dword [esp + 0x38], 0
mov eax, dword [ebx + 0x70]
mov dword [esp + 0x3c], eax
xor eax, eax
mov word [esp + 0x50], ax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x58], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x18]
mov edx, dword [ebx + 0x5c]
mov dword [esp + 0x5c], eax
mov ecx, dword [ebx + 0x58]
mov esi, dword [ebx + 0x50]
lea eax, [esp + 0x38c]
mov dword [esp + 0x164], eax
lea eax, [esp + 0x3a0]
mov dword [esp + 0x168], eax
mov al, byte [ebx + 0x58]
mov byte [esp + 0x391], al
mov eax, edx
shrd ecx, eax, 8
sar eax, 8
mov byte [esp + 0x392], cl
mov ecx, dword [ebx + 0x58]
mov eax, edx
shrd ecx, eax, 0x10
sar eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov dword [esp + 0x18], eax
mov byte [esp + 0x394], al
mov al, byte [ebx + 0x50]
mov byte [esp + 0x395], al
mov byte [esp + 0x393], cl
sar edx, 0x18
mov edx, dword [ebx + 0x54]
mov eax, edx
mov ecx, esi
shrd ecx, eax, 8
sar eax, 8
mov byte [esp + 0x396], cl
mov eax, edx
mov ecx, esi
shrd ecx, eax, 0x10
sar eax, 0x10
mov eax, esi
mov esi, dword [ebx + 0x60]
shrd eax, edx, 0x18
mov byte [esp + 0x398], al
mov al, byte [ebx + 0x60]
mov byte [esp + 0x399], al
mov byte [esp + 0x397], cl
sar edx, 0x18
mov edx, dword [ebx + 0x64]
mov eax, edx
mov ecx, esi
shrd ecx, eax, 8
sar eax, 8
mov byte [esp + 0x39a], cl
mov eax, edx
mov ecx, esi
shrd ecx, eax, 0x10
sar eax, 0x10
mov eax, esi
shrd eax, edx, 0x18
mov dword [esp + 0x38c], 0xd5455
mov byte [esp + 0x390], 7
movq xmm0, qword [esp + 0x38c]
mov byte [esp + 0x39c], al
mov eax, dword [esp + 0x18]
mov byte [esp + 0x39b], cl
movq qword [esp + 0x3a0], xmm0
push ebx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x48], 0x11
mov dword [esp + 0x4c], 9
sar edx, 0x18
mov byte [esp + 0x3ac], al
mov byte [esp + 0x3a6], 5
call fcn.10063e10
add esp, 4
test eax, eax
je 0x10065ba0
mov ecx, ebx
call fcn.10065560
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0x44]
add eax, 0x1e
add eax, dword [esp + 0x40]
add dword [ebx + 0x18], eax
cmp dword [ebx + 0x14], 0
je 0x10065bd5
mov ecx, ebx
call fcn.10065560
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
lea edi, [ebx + 0x30]
mov dword [ebx + 0x34], 0x23456789
mov dword [edi], 0x12345678
mov dword [ebx + 0x38], 0x34567890
mov esi, dword [ebx]
test esi, esi
je 0x10065c02
mov dl, byte [esi]
test dl, dl
je 0x10065c02
mov ecx, edi
call fcn.10064930
inc esi
jne 0x10065bf2
cmp byte [0x100e851a], 0
jne 0x10065c25
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call dword [sym.imp.MSVCR110.dll_srand]
add esp, 4
xor esi, esi
call dword [sym.imp.MSVCR110.dll_rand]
sar eax, 7
mov byte [esp + esi + 0x3ac], al
inc esi
cmp esi, 0xc
jl 0x10065c27
mov eax, dword [esp + 0x30]
mov esi, dword [edi + 8]
mov ebx, dword [edi]
shr eax, 8
mov byte [esp + 0x3b7], al
mov eax, dword [edi + 4]
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov al, byte [esp + ecx + 0x3ac]
movsx ecx, al
mov byte [esp + 0x12], al
xor ecx, ebx
and ecx, 0xff
mov eax, ebx
mov ebx, dword [ecx*4 + 0x100a7b58]
shr eax, 8
xor ebx, eax
movzx eax, bl
add eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 4], eax
mov dword [esp + 0x14], eax
shr eax, 0x18
xor eax, esi
and eax, 0xff
mov edx, esi
and edx, 0xfffd
or edx, 2
shr esi, 8
mov dword [edi], ebx
xor esi, dword [eax*4 + 0x100a7b58]
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, byte [esp + 0x12]
inc ecx
mov byte [esp + ecx + 0x3ab], al
mov dword [edi + 8], esi
mov dword [esp + 0x18], ecx
cmp ecx, 0xc
jl 0x10065c60
mov ebx, dword [esp + 0x24]
mov al, byte [esp + 0x13]
cmp dword [ebx], 0
je 0x10065d0f
test al, al
jne 0x10065d0f
push 0xc
lea eax, [esp + 0x3b0]
push eax
mov ecx, ebx
call fcn.10064e60
add dword [ebx + 0x18], 0xc
mov al, byte [esp + 0x13]
xor edi, edi
cmp dword [ebx], edi
je 0x10065d1e
test al, al
jne 0x10065d1e
lea ecx, [edi + 1]
jmp 0x10065d20
xor ecx, ecx
mov esi, dword [esp + 0x20]
mov byte [ebx + 0x2d], cl
test al, al
jne 0x10065d4f
cmp esi, 8
jne 0x10065d40
lea eax, [esp + 0x28]
push eax
mov ecx, ebx
call fcn.100655c0
mov edi, eax
jmp 0x10065d55
test esi, esi
jne 0x10065d55
mov ecx, ebx
call fcn.100656f0
mov edi, eax
jmp 0x10065d55
mov dword [ebx + 0x90], edi
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x10065d70
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x10065d70
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x74]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x10065f45
test edi, edi
jne 0x10065b84
add ecx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x78]
cmp dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
sete byte [esp + 0x12]
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
je 0x10065e3c
cmp dword [ebx], edi
je 0x10065dca
cmp byte [esp + 0x13], 0
je 0x10065e3c
mov ax, word [esp + 0x2c]
mov word [esp + 0x2e], si
test al, 1
jne 0x10065de5
mov ecx, 0xfff7
and ax, cx
mov word [esp + 0x2c], ax
mov word [esp + 0x54], ax
mov eax, dword [esp + 0x5c]
sub eax, dword [ebx + 0x10]
mov ecx, ebx
push eax
call fcn.10064fe0
test al, al
je 0x10065e20
push ebx
lea ecx, [esp + 0x2c]
call fcn.10063e10
add esp, 4
test eax, eax
jne 0x10065b84
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.10064fe0
test al, al
jne 0x10065e8d
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
cmp word [esp + 0x2e], si
je 0x10065e5f
mov eax, 0x4000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
test esi, esi
jne 0x10065e6a
cmp byte [esp + 0x12], 0
je 0x10065e43
push ebx
lea ecx, [esp + 0x2c]
call fcn.100640e0
add esp, 4
test eax, eax
jne 0x10065b84
mov ax, word [esp + 0x54]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x2c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x10065f45
push dword [esp + 0x48]
mov edi, dword [sym.imp.MSVCR110.dll_void____cdecl_operator_new_unsigned_int_]
call edi
add esp, 4
mov esi, eax
push dword [esp + 0x48]
push dword [esp + 0x16c]
push esi
call sub.MSVCR110.dll_memcpy
add esp, 0xc
mov dword [esp + 0x168], esi
push 0x360
call edi
mov edx, eax
mov ecx, 0xd8
lea esi, [esp + 0x2c]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x10065f00
mov dword [ebx + 0x44], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x10065f21
nop
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x10065f10
mov dword [ecx + 0x35c], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b8]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10000
mov ecx, dword [esp + 0x5c4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 0x10