Function at 0x1012f1b0
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, 0x5b0
mov eax, dword [0x101cc040]
xor eax, esp
mov dword [esp + 0x5ac], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x14], esi
je 0x1012f1f5
mov eax, 0x40000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
cmp byte [ebx + 0x2c], 0
je 0x1012f216
mov eax, 0x50000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x14], esi
cmp dword [ebx], esi
je 0x1012f226
mov dword [esp + 0x14], 0xc
lea edx, [esp + 0x3a8]
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x1012f230
cmp word [esp + 0x3a8], si
jne 0x1012f264
mov eax, 0x10000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x3a8]
jmp 0x1012f270
cmp word [eax], 0x5c
jne 0x1012f27e
mov edx, 0x2f
mov word [eax], dx
add eax, 2
cmp word [eax], si
jne 0x1012f270
mov edi, 8
lea edx, [esp + 0x3a8]
mov dword [esp + 0x10], edi
call fcn.1012e770
test al, al
je 0x1012f2a5
mov dword [esp + 0x10], esi
mov edi, esi
mov eax, dword [esp + 0xc]
mov ecx, ebx
call fcn.1012ed70
cmp eax, esi
jne 0x1012fa07
push esi
push esi
push 0x104
lea eax, [esp + 0x16c]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x3bc]
push ecx
push esi
push 0xfde9
mov dword [esp + 0x394], esi
mov byte [esp + 0x70], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x160]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1012f2f3
sub eax, edx
mov dword [esp + 0x30], eax
xor edx, edx
mov eax, 0xb17
mov byte [esp + 0x264], cl
mov word [esp + 0x42], dx
mov edx, dword [ebx + 0x68]
mov word [esp + 0x18], ax
mov ecx, 0x14
mov eax, 8
mov dword [esp + 0x15c], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x368], 1
mov dword [esp + 0x370], esi
mov word [esp + 0x1a], cx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
mov word [esp + 0x1c], ax
cmp dword [ebx], esi
je 0x1012f362
mov eax, 9
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov word [esp + 0x1e], di
cmp edi, esi
jne 0x1012f383
mov eax, dword [ebx + 0x70]
cmp eax, esi
jl 0x1012f383
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x28], eax
jmp 0x1012f387
mov dword [esp + 0x28], esi
mov edx, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x58]
mov edi, dword [ebx + 0x5c]
mov dword [esp + 0x2c], edx
mov edx, dword [ebx + 0x18]
add edx, dword [ebx + 0x10]
xor eax, eax
mov word [esp + 0x40], ax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov dl, byte [ebx + 0x58]
lea ecx, [esp + 0x39c]
lea eax, [esp + 0x388]
mov dword [esp + 0x154], eax
mov dword [esp + 0x158], ecx
mov byte [esp + 0x38d], dl
mov eax, esi
mov edx, edi
mov cl, 8
mov dword [esp + 0x34], 0x11
mov dword [esp + 0x38], 9
mov byte [esp + 0x388], 0x55
mov byte [esp + 0x389], 0x54
mov byte [esp + 0x38a], 0xd
mov byte [esp + 0x38b], 0
mov byte [esp + 0x38c], 7
call fcn.1013a690
mov byte [esp + 0x38e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a690
mov byte [esp + 0x38f], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a690
mov esi, dword [ebx + 0x50]
mov edi, dword [ebx + 0x54]
mov byte [esp + 0x390], al
mov al, byte [ebx + 0x50]
mov byte [esp + 0x391], al
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.1013a690
mov byte [esp + 0x392], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a690
mov byte [esp + 0x393], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a690
movzx ecx, byte [ebx + 0x60]
mov esi, dword [ebx + 0x60]
mov edi, dword [ebx + 0x64]
mov byte [esp + 0x394], al
mov byte [esp + 0x395], cl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.1013a690
mov byte [esp + 0x396], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a690
mov byte [esp + 0x397], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a690
mov edx, dword [esp + 0x388]
mov byte [esp + 0x398], al
mov eax, dword [esp + 0x38c]
mov dword [esp + 0x39c], edx
mov dword [esp + 0x3a0], eax
movzx ecx, byte [esp + 0x390]
mov esi, ebx
lea edi, [esp + 0x18]
mov byte [esp + 0x3a4], cl
mov byte [esp + 0x39e], 5
call fcn.1012dbb0
test eax, eax
je 0x1012f52f
call fcn.1012efe0
mov eax, 0x400
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
lea ecx, [edx + eax + 0x1e]
add dword [ebx + 0x18], ecx
cmp dword [ebx + 0x14], 0
je 0x1012f562
call fcn.1012efe0
mov eax, dword [ebx + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebx]
lea esi, [ebx + 0x30]
mov dword [esi], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
test edi, edi
je 0x1012f591
mov cl, byte [edi]
test cl, cl
je 0x1012f591
mov edx, esi
call fcn.1012e720
add edi, 1
jne 0x1012f57f
cmp byte [0x101cf2a0], 0
jne 0x1012f5b3
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, eax
push edi
call fcn.10130354
add esp, 4
xor edi, edi
call fcn.10130366
sar eax, 7
mov byte [esp + edi + 0x37c], al
inc edi
cmp edi, 0xc
jl 0x1012f5b5
mov edx, dword [esp + 0x20]
shr edx, 8
mov byte [esp + 0x387], dl
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
mov cl, byte [esp + eax + 0x37c]
movsx ecx, cl
mov edi, dword [esi]
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x10143c58]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
and edx, 0xfffd
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x10143c58]
mov edi, dword [esi]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37c]
mov byte [esp + eax + 0x37c], cl
mov cl, byte [esp + eax + 0x37d]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x10143c58]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
and edx, 0xfffd
mov edi, dword [esi]
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x10143c58]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37d]
mov byte [esp + eax + 0x37d], cl
mov cl, byte [esp + eax + 0x37e]
mov eax, dword [esi + 8]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x10143c58]
mov edx, eax
and edx, 0xfffd
mov dword [esp + 8], ecx
shr edi, 8
or edx, 2
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edi, dword [esi]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x10143c58]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37e]
mov byte [esp + eax + 0x37e], cl
mov cl, byte [esp + eax + 0x37f]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x10143c58]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x10143c58]
and edx, 0xfffd
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
shr ecx, 8
xor cl, byte [esp + eax + 0x37f]
add eax, 4
cmp eax, 0xc
mov byte [esp + eax + 0x37b], cl
mov dword [esp + 0xc], eax
jl 0x1012f5e0
cmp dword [ebx], 0
je 0x1012f80a
push 0xc
lea edx, [esp + 0x380]
push edx
mov ecx, ebx
call fcn.1012eb70
add dword [ebx + 0x18], 0xc
xor eax, eax
xor esi, esi
cmp dword [ebx], esi
setne al
mov byte [ebx + 0x2d], al
mov eax, dword [esp + 0x10]
cmp eax, 8
jne 0x1012f82d
lea eax, [esp + 0x18]
push eax
mov edi, ebx
call fcn.1012f040
jmp 0x1012f838
test eax, eax
jne 0x1012f83a
mov eax, ebx
call fcn.1012f150
mov esi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x1012f855
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x1012f855
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x74]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edi
test eax, eax
jne 0x1012fa07
test esi, esi
jne 0x1012f514
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx]
cmp dword [esp + 0x28], eax
mov edx, dword [ebx + 0x78]
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
je 0x1012f918
cmp dword [ebx], esi
jne 0x1012f918
test byte [esp + 0x1c], 1
mov ax, word [esp + 0x10]
mov word [esp + 0x1e], ax
jne 0x1012f8c0
mov ecx, 0xfff7
and word [esp + 0x1c], cx
mov dx, word [esp + 0x1c]
mov word [esp + 0x44], dx
mov edx, dword [esp + 0x4c]
sub edx, dword [ebx + 0x10]
mov eax, ebx
call fcn.1012ecc0
test al, al
je 0x1012f8fd
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.1012dbb0
test eax, eax
jne 0x1012f514
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.1012ecc0
test al, al
jne 0x1012f967
mov eax, 0x2000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x10]
cmp word [esp + 0x1e], ax
je 0x1012f93e
mov eax, 0x4000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
test eax, eax
jne 0x1012f946
test cl, cl
je 0x1012f923
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.1012de80
test eax, eax
jne 0x1012f514
mov ax, word [esp + 0x44]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x1012fa07
mov ecx, dword [esp + 0x38]
push ecx
call fcn.1012fc96
mov edx, dword [esp + 0x3c]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x158]
push edx
push eax
push esi
call fcn.10137d10
add esp, 0xc
push 0x360
mov dword [esp + 0x15c], esi
call fcn.1012fc96
mov ecx, 0xd8
lea esi, [esp + 0x1c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x1012f9da
mov dword [ebx + 0x44], eax
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4
cmp dword [ecx + 0x35c], 0
je 0x1012f9ff
jmp 0x1012f9f0
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x1012f9f0
mov dword [ecx + 0x35c], eax
xor eax, eax
mov ecx, dword [esp + 0x5b4]
pop edi
pop esi
xor ecx, esp
call fcn.1012fc12
mov esp, ebp
pop ebp
ret 4