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

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x1c]
xor eax, eax
push ebx
xor ebx, ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
push esi
test edx, edx
je 0x49ce5b
mov byte [edx], al
mov esi, dword [esp + 0x18]
test esi, esi
je 0x49d10e
mov esi, dword [esi + 0x7c]
test esi, esi
je 0x49d10e
cmp dword [esi], eax
jne 0x49ce81
pop esi
mov eax, 0xffffff9c
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x49ce91
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], ecx
cmp ecx, eax
jbe 0x49cea7
mov dword [esi + 0x14], eax
mov ecx, eax
push ebp
push edi
test ecx, ecx
je 0x49d104
mov ebx, dword [esi + 8]
test ebx, ebx
jne 0x49cfad
mov eax, dword [esi + 0x58]
test eax, eax
je 0x49cfad
mov ecx, dword [esi + 0x60]
mov ebp, 0x4000
mov edx, dword [esi + 0x68]
cmp eax, ebp
cmovb ebp, eax
add edx, dword [esi + 0x3c]
cmp byte [ecx], bl
je 0x49cefa
cmp byte [ecx + 1], bl
je 0x49d0e1
mov eax, dword [ecx + 0xc]
push ebx
push ebx
add eax, edx
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x49cefd
mov dword [ecx + 0x1c], edx
push dword [esi + 0x60]
push 1
push ebp
push dword [esi]
call fcn.0049c870
add esp, 0x10
cmp eax, 1
jne 0x49d0e1
add dword [esi + 0x3c], ebp
mov ebx, ebp
sub dword [esi + 0x58], ebp
cmp byte [esi + 0x6c], 0
mov eax, dword [esi]
mov dword [esi + 4], eax
mov dword [esi + 8], ebp
je 0x49cfad
xor ecx, ecx
mov dword [esp + 0x20], ecx
test ebp, ebp
je 0x49cfad
mov ebx, eax
nop dword [eax]
mov edi, dword [esi + 0x78]
mov eax, edi
and eax, 0xfffd
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor dl, byte [ecx + ebx]
mov ecx, dword [esi + 0x70]
movsx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x685bd8]
xor eax, ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x70], eax
movzx eax, al
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x685bd8]
mov dword [esi + 0x78], edi
mov byte [ecx + ebx], dl
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, ebp
jb 0x49cf40
mov ebx, dword [esi + 8]
mov edx, dword [esi + 0x7c]
mov ecx, ebx
cmp edx, ebx
cmovbe ecx, edx
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x49cff1
mov eax, dword [esi + 4]
add eax, ecx
mov cl, byte [eax - 1]
mov byte [esp + 0x20], cl
mov ecx, dword [esp + 0x18]
sub ebx, ecx
sub dword [esi + 0x5c], ecx
sub edx, ecx
mov dword [esi + 8], ebx
mov dword [esi + 4], eax
mov dword [esi + 0x7c], edx
jne 0x49cff1
mov al, byte [esp + 0x20]
cmp al, byte [esi + 0x80]
jne 0x49d0ec
cmp dword [esi + 0x64], 0
jne 0x49d07c
mov eax, dword [esi + 0x14]
cmp eax, ebx
mov ebp, eax
mov dword [esp + 0x20], eax
cmovae ebp, ebx
xor edx, edx
test ebp, ebp
je 0x49d02b
nop
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, ebp
jb 0x49d010
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [esp + 0x20], eax
mov edi, dword [esi + 0x10]
push ebp
push edi
push dword [esi + 0x50]
call fcn.0049c8f0
sub dword [esi + 0x5c], ebp
sub ebx, ebp
add dword [esi + 4], ebp
add esp, 0xc
add dword [esi + 0x18], ebp
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x20]
sub eax, ebp
mov dword [esi + 8], ebx
mov ebx, dword [esp + 0x14]
add ebx, ebp
mov dword [esi + 0x14], eax
cmp dword [esi + 0x5c], 0
lea eax, [edi + ebp]
mov ebp, dword [esp + 0x10]
mov dword [esi + 0x10], eax
mov dword [esp + 0x14], ebx
jne 0x49d0c9
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x49d0c9
mov byte [edx], 1
jmp 0x49d0c9
mov edi, dword [esi + 0x18]
lea eax, [esi + 4]
mov ebx, dword [esi + 0x10]
push 2
push eax
call fcn.0049a610
mov ebp, dword [esi + 0x18]
sub ebp, edi
mov dword [esp + 0x18], eax
push ebp
push ebx
push dword [esi + 0x50]
call fcn.0049c8f0
mov ebx, dword [esp + 0x28]
add esp, 0x14
mov dword [esi + 0x50], eax
add ebx, ebp
mov eax, dword [esi + 0x5c]
sub eax, ebp
mov dword [esp + 0x14], ebx
mov ebp, dword [esp + 0x10]
mov dword [esi + 0x5c], eax
cmp ebp, 1
je 0x49d0f9
test eax, eax
je 0x49d0f9
test ebp, ebp
jne 0x49d0d7
cmp dword [esi + 0x14], 0
ja 0x49ceb1
test ebp, ebp
je 0x49d104
pop edi
mov eax, ebp
pop ebp
pop esi
pop ebx
add esp, 0xc
ret
pop edi
pop ebp
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0xc
ret
pop edi
pop ebp
pop esi
mov eax, 0xffffff96
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x49d104
mov byte [ecx], 1
pop edi
pop ebp
pop esi
mov eax, ebx
pop ebx
add esp, 0xc
ret
pop esi
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret