Function at 0x403cd0
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
sub esp, 0x24
mov eax, dword [0x42c004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x1c], edx
push 1
push esi
mov edx, 0x176
mov ecx, 0x34
call fcn.00410740
call eax
test eax, eax
jne 0x40428d
mov ecx, dword [esi]
test cl, 8
je 0x403d21
mov eax, 0xd
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041084f
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
and ecx, 0xffffff0f
mov dword [esi + 0x78], 0
mov dword [esi + 0x7c], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x60], 0
mov dword [esi], ecx
test ebx, ebx
je 0x40428d
mov edx, dword [ebp + 0xc]
mov eax, edx
mov edi, dword [ebp + 0x10]
or eax, edi
je 0x40428d
or ecx, 0xa0
mov dword [esi + 0x64], ebx
mov dword [esi], ecx
mov ecx, 0x159
mov dword [esi + 0x68], edx
mov dword [esi + 0x6c], edi
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], edi
mov dword [esi + 0x70], 0
mov dword [esi + 0x74], 0
call fcn.004047a0
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x403db5
lea edi, [eax + 2]
jmp 0x404292
movzx eax, byte [0xaf58e0]
push 0x150
push eax
push ebx
call fcn.00411cd0
add esp, 0xc
lea edi, [ebx + 0x48]
mov edx, 0x116
mov ecx, 0x34
push 0
push 0
push 0x104
push edi
push 0xffffffffffffffff
push dword [ebp - 0x1c]
push 0
push 0xfde9
call fcn.00410740
call eax
mov dword [ebx + 0x20], eax
test eax, eax
je 0x404286
add eax, 0xffffffff
mov dword [ebx + 0x20], eax
je 0x404286
mov al, byte [edi]
test al, al
je 0x403e21
cmp al, 0x5c
jne 0x403e19
mov byte [edi], 0x2f
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403e12
lea eax, [ebp - 0x18]
mov dword [ebx + 0x24], 0x11
mov dword [ebx + 0x40], eax
mov ecx, 8
lea eax, [ebx + 0x150]
mov word [ebx], cx
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x28], 9
mov byte [eax + 2], 5
cmp dword [esi], 0
mov dword [ebp - 0x20], 0
jge 0x403e5f
mov dword [ebx + 0x24], 0
jmp 0x403e74
cmp dword [esi + 8], 0
je 0x403e74
mov eax, 9
mov dword [ebp - 0x20], 0xc
mov word [ebx], ax
mov ax, word [ebx]
mov edx, esi
mov word [ebx + 2], cx
mov word [ebx + 0x30], ax
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 0x18], eax
mov ecx, dword [esi + 0x18]
add ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
adc eax, dword [esi + 0x14]
mov dword [ebx + 0x38], ecx
mov ecx, ebx
mov dword [ebx + 0x3c], eax
mov dword [esi + 0x20], 0
call fcn.00402b40
mov edi, dword [esi + 0x20]
test edi, edi
jne 0x4040ba
mov edx, dword [esi]
mov ecx, dword [ebx + 0x20]
test edx, edx
jns 0x403ecf
lea eax, [ecx + 0xb]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], eax
jmp 0x404025
mov eax, dword [ebx + 0x24]
add eax, 0x32
add ecx, eax
xor eax, eax
add dword [esi + 0x10], ecx
adc eax, dword [esi + 0x14]
cmp dword [ebp - 0x20], 0
mov dword [esi + 0x14], eax
je 0x404025
mov edx, dword [esi + 8]
mov dword [esi + 0x38], 0x12345678
mov dword [esi + 0x3c], 0x23456789
mov dword [esi + 0x40], 0x34567890
test edx, edx
je 0x403f53
mov al, byte [edx]
test al, al
je 0x403f53
mov ecx, dword [esi + 0x38]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x421d28]
movzx eax, cl
add eax, dword [esi + 0x3c]
imul eax, eax, 0x8088405
mov dword [esi + 0x38], ecx
mov ecx, dword [esi + 0x40]
inc eax
mov dword [esi + 0x3c], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x421d28]
mov dword [esi + 0x40], ecx
add edx, 1
jne 0x403f08
xor edi, edi
nop word [eax + eax]
mov edx, 0x158
mov ecx, 0x34
call fcn.00410740
call eax
shrd eax, edx, 7
mov byte [ebp + edi - 0x14], al
inc edi
cmp edi, 0xc
jl 0x403f60
mov al, byte [ebx + 5]
xor ecx, ecx
mov byte [ebp - 9], al
mov dword [ebp - 0x1c], ecx
nop word [eax + eax]
mov bl, byte [ebp + ecx - 0x14]
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x40]
mov edi, edx
movsx eax, bl
and edi, 0xfffd
xor eax, ecx
or edi, 2
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x421d28]
movzx eax, cl
add eax, dword [esi + 0x3c]
imul eax, eax, 0x8088405
mov dword [esi + 0x38], ecx
mov ecx, dword [ebp - 0x1c]
inc eax
mov dword [esi + 0x3c], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [eax*4 + 0x421d28]
mov eax, edi
xor eax, 1
mov dword [esi + 0x40], edx
imul eax, edi
shr eax, 8
xor al, bl
mov byte [ebp + ecx - 0x14], al
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, 0xc
jl 0x403f90
push 0xc
lea edx, [ebp - 0x14]
mov ecx, esi
call fcn.00403700
mov edi, dword [esi + 0x20]
add esp, 4
test edi, edi
jne 0x4040ba
add dword [esi + 0x10], 0xc
mov ebx, dword [ebp - 0x24]
adc dword [esi + 0x14], edi
or dword [esi], 0x10
mov edx, dword [esi]
cmp dword [esi + 0x64], 0
je 0x404076
mov edx, ebx
mov ecx, esi
call fcn.00403a40
mov edi, dword [esi + 0x20]
test edi, edi
jne 0x4040ba
and dword [esi], 0xffffffef
mov edx, dword [esi]
test dl, 0x40
je 0x404059
push dword [esi + 0x64]
mov edx, 0x97
lea ecx, [edi + 0x34]
call fcn.00410740
call eax
mov edx, dword [esi]
mov eax, dword [esi + 0x58]
and edx, 0xffffffbf
mov ecx, dword [esi + 0x5c]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x78]
add dword [esi + 0x10], eax
mov eax, dword [esi + 0x7c]
adc dword [esi + 0x14], eax
mov dword [esi], edx
mov dword [esi + 0x54], ecx
test edx, edx
jns 0x4040c9
or edx, 8
mov ecx, esi
mov dword [esi], edx
mov edx, dword [esi + 0x60]
call fcn.00403580
movzx edx, word [esi + 0x62]
mov ecx, esi
call fcn.00403580
mov edx, dword [esi + 0x58]
mov ecx, esi
call fcn.00403580
mov edx, dword [esi + 0x58]
mov ecx, esi
mov eax, dword [esi + 0x5c]
shrd edx, eax, 0x10
call fcn.00403580
mov edi, dword [esi + 0x20]
test edi, edi
je 0x404265
mov ebx, dword [ebp - 0x24]
mov ecx, ebx
call fcn.00404850
jmp 0x404292
mov eax, dword [esi + 0x60]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
mov dword [ebx + 8], eax
mov eax, edx
add eax, dword [esi + 0x78]
adc ecx, dword [esi + 0x7c]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], ecx
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], ecx
test byte [esi], 4
je 0x404171
test edx, edx
jne 0x404171
mov eax, 8
mov word [ebx + 2], ax
movzx eax, word [ebx]
mov ecx, eax
test al, 1
jne 0x404114
and eax, 0xfff7
mov word [ebx], ax
movzx ecx, ax
mov eax, dword [ebx + 0x3c]
mov word [ebx + 0x30], cx
mov ecx, dword [ebx + 0x38]
sub ecx, dword [esi + 0x18]
sbb eax, dword [esi + 0x1c]
push eax
push ecx
mov ecx, esi
call fcn.004038a0
add esp, 8
test eax, eax
je 0x404160
mov edx, esi
mov ecx, ebx
call fcn.00402b40
mov edi, dword [esi + 0x20]
test edi, edi
jne 0x4040ba
push dword [esi + 0x14]
mov ecx, esi
push dword [esi + 0x10]
call fcn.004038a0
add esp, 8
test eax, eax
jne 0x40422c
mov ecx, ebx
mov edi, 0x10
call fcn.00404850
jmp 0x404292
cmp word [ebx + 2], 8
jne 0x404278
mov edx, 0x8074b50
mov ecx, esi
call fcn.00403580
mov edx, 0x807
mov ecx, esi
call fcn.00403580
mov edx, dword [ebx + 8]
mov ecx, esi
call fcn.00403580
movzx edx, word [ebx + 0xa]
mov ecx, esi
call fcn.00403580
cmp dword [ebx + 0x14], 0
mov edx, dword [ebx + 0x10]
ja 0x4041ca
cmp edx, 0xffffffff
jae 0x4041ca
mov ecx, esi
call fcn.00403580
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
shrd edx, eax, 0x10
jmp 0x4041d7
or edx, 0xffffffff
mov ecx, esi
call fcn.00403580
or edx, 0xffffffff
mov ecx, esi
call fcn.00403580
cmp dword [ebx + 0x1c], 0
mov edx, dword [ebx + 0x18]
ja 0x4041ff
cmp edx, 0xffffffff
jae 0x4041ff
mov ecx, esi
call fcn.00403580
mov edx, dword [ebx + 0x18]
mov eax, dword [ebx + 0x1c]
shrd edx, eax, 0x10
jmp 0x40420c
or edx, 0xffffffff
mov ecx, esi
call fcn.00403580
or edx, 0xffffffff
mov ecx, esi
call fcn.00403580
mov edi, dword [esi + 0x20]
test edi, edi
jne 0x4040ba
add dword [esi + 0x10], 0x10
adc dword [esi + 0x14], edi
mov ax, word [ebx + 0x30]
mov word [ebx], ax
mov ecx, dword [esi + 0x4c]
test ecx, ecx
jne 0x404249
mov dword [esi + 0x4c], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041084f
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0x14c]
test eax, eax
je 0x40425f
mov ecx, eax
mov eax, dword [ecx + 0x14c]
test eax, eax
jne 0x404253
mov dword [ecx + 0x14c], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041084f
mov esp, ebp
pop ebp
ret
mov ecx, ebx
mov edi, 0x11
call fcn.00404850
jmp 0x404292
mov ecx, ebx
call fcn.00404850
mov edi, 9
test byte [esi], 0x40
je 0x4042a9
push dword [esi + 0x64]
mov edx, 0x97
lea ecx, [edx - 0x63]
call fcn.00410740
call eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041084f
mov esp, ebp
pop ebp
ret