Function at 0x4182e0
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, 0x4ac
mov eax, dword [0x551764]
xor eax, esp
mov dword [esp + 0x4a8], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [esp + 8], eax
push esi
push edi
cmp dword [ebx + 0x14], 0
je 0x418328
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebx + 0x2c], 0
je 0x41834a
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
xor edi, edi
mov eax, 0xc
cmp dword [ebx], edi
cmovne edi, eax
xor ecx, ecx
mov dword [esp + 0x14], edi
nop dword [eax]
mov al, byte [ecx + str.foobar.dat]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x3a7], al
test al, al
jne 0x418360
cmp byte [esp + 0x3a8], al
jne 0x418399
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
lea eax, [esp + 0x3a8]
cmp byte [eax], 0x5c
jne 0x4183a8
mov byte [eax], 0x2f
inc eax
cmp byte [eax], 0
jne 0x4183a0
lea ecx, [esp + 0x3a8]
call fcn.00417aa0
push dword [ebp + 0x10]
mov esi, dword [ebp + 0x18]
xor ecx, ecx
push dword [esp + 0x14]
test al, al
cmovne esi, ecx
mov ecx, ebx
mov dword [ebp + 0x18], esi
call fcn.00417ea0
test eax, eax
jne 0x418999
mov dword [esp + 0x374], eax
xor ecx, ecx
mov byte [esp + 0x50], al
nop word [eax + eax]
mov al, byte [esp + ecx + 0x3a8]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x15f], al
test al, al
jne 0x4183f0
lea ecx, [esp + 0x160]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x418410
mov byte [esp + 0x264], al
sub ecx, edx
xor eax, eax
mov dword [esp + 0x30], ecx
cmp dword [ebx], 0
mov word [esp + 0x42], ax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0x20], eax
mov eax, 8
mov dword [esp + 0x15c], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x368], 1
mov dword [esp + 0x370], 0
mov dword [esp + 0x18], 0x140b17
mov dword [esp + 0x24], 0
mov word [esp + 0x1c], ax
je 0x418484
mov eax, 9
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov word [esp + 0x1e], si
test esi, esi
jne 0x4184a1
mov eax, dword [ebx + 0x70]
test eax, eax
js 0x4184a1
add eax, edi
mov dword [esp + 0x28], eax
jmp 0x4184a9
mov dword [esp + 0x28], 0
mov eax, dword [ebx + 0x70]
mov dword [esp + 0x2c], eax
xor eax, eax
mov word [esp + 0x40], ax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x18]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x37c]
mov dword [esp + 0x154], eax
lea eax, [esp + 0x390]
mov edx, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x58]
mov dword [esp + 0x158], eax
mov al, byte [ebx + 0x58]
mov byte [esp + 0x381], al
mov eax, edx
shrd ecx, eax, 8
mov dword [esp + 0x37c], 0xd5455
sar eax, 8
mov byte [esp + 0x382], cl
mov eax, edx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
mov byte [esp + 0x380], 7
sar eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov byte [esp + 0x383], cl
mov ecx, dword [ebx + 0x50]
mov dword [esp + 0x10], eax
mov byte [esp + 0x384], al
mov al, byte [ebx + 0x50]
mov byte [esp + 0x385], al
sar edx, 0x18
mov edx, dword [ebx + 0x54]
mov eax, edx
shrd ecx, eax, 8
movq xmm0, qword [esp + 0x37c]
sar eax, 8
mov byte [esp + 0x386], cl
mov eax, edx
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 0x10
movq qword [esp + 0x390], xmm0
sar eax, 0x10
mov eax, dword [ebx + 0x50]
shrd eax, edx, 0x18
mov byte [esp + 0x387], cl
mov ecx, dword [ebx + 0x60]
mov byte [esp + 0x388], al
mov al, byte [ebx + 0x60]
mov byte [esp + 0x389], al
sar edx, 0x18
mov edx, dword [ebx + 0x64]
mov eax, edx
shrd ecx, eax, 8
push ebx
sar eax, 8
mov byte [esp + 0x38e], cl
mov eax, edx
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 0x10
mov dword [esp + 0x38], 0x11
sar eax, 0x10
mov eax, dword [ebx + 0x60]
shrd eax, edx, 0x18
mov byte [esp + 0x38f], cl
lea ecx, [esp + 0x1c]
mov byte [esp + 0x390], al
mov eax, dword [esp + 0x14]
sar edx, 0x18
mov dword [esp + 0x3c], 9
mov byte [esp + 0x39c], al
mov byte [esp + 0x396], 5
call fcn.004170e0
add esp, 4
test eax, eax
je 0x418630
mov ecx, ebx
call fcn.004180e0
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x30]
add eax, 0x1e
add eax, dword [esp + 0x34]
add dword [ebx + 0x18], eax
cmp dword [ebx + 0x14], 0
je 0x418665
mov ecx, ebx
call fcn.004180e0
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
mov dword [ebx + 0x30], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
mov edx, dword [ebx]
test edx, edx
je 0x4186ce
mov al, byte [edx]
test al, al
je 0x4186ce
mov ecx, dword [ebx + 0x30]
movsx eax, al
xor eax, dword [ebx + 0x30]
movzx eax, al
shr ecx, 8
mov eax, dword [eax*4 + 0x52fdb8]
xor eax, ecx
mov ecx, dword [ebx + 0x38]
mov dword [ebx + 0x30], eax
movzx eax, al
add eax, dword [ebx + 0x34]
imul eax, eax, 0x8088405
inc eax
mov dword [ebx + 0x34], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x52fdb8]
mov dword [ebx + 0x38], ecx
add edx, 1
jne 0x418680
cmp byte [0x576adc], 0
jne 0x4186f0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call fcn.004ce3bd
add esp, 4
xor esi, esi
call fcn.004ce39c
sar eax, 7
mov byte [esp + esi + 0x39c], al
inc esi
cmp esi, 0xc
jl 0x4186f2
mov eax, dword [esp + 0x20]
shr eax, 8
xor edi, edi
mov byte [esp + 0x3a7], al
nop word [eax + eax]
mov al, byte [esp + edi + 0x39c]
mov ecx, dword [ebx + 0x30]
mov byte [esp + 0xf], al
movsx eax, al
xor eax, dword [ebx + 0x30]
movzx eax, al
mov edx, dword [ebx + 0x38]
mov esi, edx
shr ecx, 8
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x52fdb8]
xor eax, ecx
mov dword [ebx + 0x30], eax
movzx eax, al
add eax, dword [ebx + 0x34]
imul eax, eax, 0x8088405
inc eax
mov dword [ebx + 0x34], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [eax*4 + 0x52fdb8]
mov eax, esi
xor eax, 1
mov dword [ebx + 0x38], edx
imul eax, esi
shr eax, 8
xor al, byte [esp + 0xf]
mov byte [esp + edi + 0x39c], al
inc edi
cmp edi, 0xc
jl 0x418720
cmp dword [ebx], 0
je 0x4187af
push 0xc
lea eax, [esp + 0x3a0]
mov ecx, ebx
push eax
call fcn.00417c70
add dword [ebx + 0x18], 0xc
mov esi, dword [ebp + 0x18]
xor eax, eax
xor edi, edi
cmp dword [ebx], eax
setne al
mov byte [ebx + 0x2d], al
cmp esi, 8
jne 0x4187d1
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.00418140
jmp 0x4187dc
test esi, esi
jne 0x4187de
mov ecx, ebx
call fcn.00418270
mov edi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x4187f9
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4187f9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
add dword [ebx + 0x18], ecx
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x418999
test edi, edi
jne 0x418614
add ecx, dword [esp + 0x14]
cmp dword [esp + 0x28], ecx
mov eax, dword [ebx + 0x78]
sete byte [esp + 0xf]
mov dword [esp + 0x24], eax
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
je 0x4188ba
cmp dword [ebx], edi
jne 0x4188ba
mov ax, word [esp + 0x1c]
mov word [esp + 0x1e], si
test al, 1
jne 0x418863
mov ecx, 0xfff7
and ax, cx
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov ecx, ebx
mov eax, dword [esp + 0x4c]
sub eax, dword [ebx + 0x10]
push eax
call fcn.00417dc0
test al, al
je 0x41889e
push ebx
lea ecx, [esp + 0x1c]
call fcn.004170e0
add esp, 4
test eax, eax
jne 0x418614
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.00417dc0
test al, al
jne 0x41890b
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
cmp word [esp + 0x1e], si
je 0x4188dd
mov eax, 0x4000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14
test esi, esi
jne 0x4188e8
cmp byte [esp + 0xf], 0
je 0x4188c1
push ebx
lea ecx, [esp + 0x1c]
call fcn.00417390
add esp, 4
test eax, eax
jne 0x418614
mov ax, word [esp + 0x44]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x418999
push dword [esp + 0x38]
call fcn.004c71b1
add esp, 4
mov esi, eax
push dword [esp + 0x38]
push dword [esp + 0x15c]
push esi
call fcn.004c9ec0
add esp, 0xc
mov dword [esp + 0x158], esi
push 0x360
call fcn.004c7170
mov edx, eax
lea esi, [esp + 0x1c]
mov ecx, 0xd8
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x418967
mov dword [ebx + 0x44], edx
jmp 0x418997
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x418991
nop word [eax + eax]
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x418980
mov dword [ecx + 0x35c], edx
xor eax, eax
mov ecx, dword [esp + 0x4b4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret 0x14