Function at 0x1012f370
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 [0x101ce040]
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 0x1012f3b5
mov eax, 0x40000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
cmp byte [ebx + 0x2c], 0
je 0x1012f3d6
mov eax, 0x50000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x14], esi
cmp dword [ebx], esi
je 0x1012f3e6
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 0x1012f3f0
cmp word [esp + 0x3a8], si
jne 0x1012f424
mov eax, 0x10000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x3a8]
jmp 0x1012f430
cmp word [eax], 0x5c
jne 0x1012f43e
mov edx, 0x2f
mov word [eax], dx
add eax, 2
cmp word [eax], si
jne 0x1012f430
mov edi, 8
lea edx, [esp + 0x3a8]
mov dword [esp + 0x10], edi
call fcn.1012e930
test al, al
je 0x1012f465
mov dword [esp + 0x10], esi
mov edi, esi
mov eax, dword [esp + 0xc]
mov ecx, ebx
call fcn.1012ef30
cmp eax, esi
jne 0x1012fbc7
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 [0x10142060]
lea eax, [esp + 0x160]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1012f4b3
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 0x1012f522
mov eax, 9
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov word [esp + 0x1e], di
cmp edi, esi
jne 0x1012f543
mov eax, dword [ebx + 0x70]
cmp eax, esi
jl 0x1012f543
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x28], eax
jmp 0x1012f547
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.1013a850
mov byte [esp + 0x38e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a850
mov byte [esp + 0x38f], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a850
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.1013a850
mov byte [esp + 0x392], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a850
mov byte [esp + 0x393], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a850
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.1013a850
mov byte [esp + 0x396], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.1013a850
mov byte [esp + 0x397], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.1013a850
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.1012dd70
test eax, eax
je 0x1012f6ef
call fcn.1012f1a0
mov eax, 0x400
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
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 0x1012f722
call fcn.1012f1a0
mov eax, dword [ebx + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
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 0x1012f751
mov cl, byte [edi]
test cl, cl
je 0x1012f751
mov edx, esi
call fcn.1012e8e0
add edi, 1
jne 0x1012f73f
cmp byte [0x101d12a0], 0
jne 0x1012f773
call dword [0x101421a4]
mov edi, eax
call dword [0x10142058]
xor edi, eax
push edi
call fcn.10130514
add esp, 4
xor edi, edi
call fcn.10130526
sar eax, 7
mov byte [esp + edi + 0x37c], al
inc edi
cmp edi, 0xc
jl 0x1012f775
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 + 0x10144c58]
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 0x1012f7a0
cmp dword [ebx], 0
je 0x1012f9ca
push 0xc
lea edx, [esp + 0x380]
push edx
mov ecx, ebx
call fcn.1012ed30
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 0x1012f9ed
lea eax, [esp + 0x18]
push eax
mov edi, ebx
call fcn.1012f200
jmp 0x1012f9f8
test eax, eax
jne 0x1012f9fa
mov eax, ebx
call fcn.1012f310
mov esi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x1012fa15
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x1012fa15
push eax
call dword [0x1014209c]
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 0x1012fbc7
test esi, esi
jne 0x1012f6d4
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 0x1012fad8
cmp dword [ebx], esi
jne 0x1012fad8
test byte [esp + 0x1c], 1
mov ax, word [esp + 0x10]
mov word [esp + 0x1e], ax
jne 0x1012fa80
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.1012ee80
test al, al
je 0x1012fabd
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.1012dd70
test eax, eax
jne 0x1012f6d4
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.1012ee80
test al, al
jne 0x1012fb27
mov eax, 0x2000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x10]
cmp word [esp + 0x1e], ax
je 0x1012fafe
mov eax, 0x4000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
test eax, eax
jne 0x1012fb06
test cl, cl
je 0x1012fae3
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.1012e040
test eax, eax
jne 0x1012f6d4
mov ax, word [esp + 0x44]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x1012fbc7
mov ecx, dword [esp + 0x38]
push ecx
call fcn.1012fe56
mov edx, dword [esp + 0x3c]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x158]
push edx
push eax
push esi
call fcn.10137ed0
add esp, 0xc
push 0x360
mov dword [esp + 0x15c], esi
call fcn.1012fe56
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 0x1012fb9a
mov dword [ebx + 0x44], eax
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4
cmp dword [ecx + 0x35c], 0
je 0x1012fbbf
jmp 0x1012fbb0
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x1012fbb0
mov dword [ecx + 0x35c], eax
xor eax, eax
mov ecx, dword [esp + 0x5b4]
pop edi
pop esi
xor ecx, esp
call fcn.1012fdd2
mov esp, ebp
pop ebp
ret 4