Function at 0x40c400
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, 0x5b4
mov eax, dword [0x419014]
xor eax, esp
mov dword [esp + 0x5b0], 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 0x40c448
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x40c46a
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebx]
lea edx, [esp + 0x3b0]
mov ecx, dword [ebp + 8]
neg edi
sbb edi, edi
and edi, 0xc
sub edx, ecx
mov dword [esp + 0x1c], edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40c483
mov ax, word [esp + 0x3b0]
test ax, ax
jne 0x40c4bc
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x3b0]
movzx edx, ax
mov esi, 0x2f
nop dword [eax + eax]
cmp dx, 0x5c
jne 0x40c4d9
mov word [ecx], si
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x40c4d0
lea ecx, [esp + 0x3b0]
mov dword [esp + 0x14], 8
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c500
sub ecx, edx
lea esi, [esp + 0x3b0]
sar ecx, 1
lea eax, [esp + 0x3b0]
lea esi, [esi + ecx*2]
cmp esi, eax
jbe 0x40c538
cmp word [esi], 0x2e
je 0x40c538
sub esi, 2
lea eax, [esp + 0x3b0]
cmp esi, eax
ja 0x40c524
lea eax, [esp + 0x3b0]
cmp esi, eax
jne 0x40c54d
cmp word [esi], 0x2e
jne 0x40c5d7
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
push 0x415778
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..zip
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..zoo
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..arc
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..lzh
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..arj
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push 0x4157b0
push esi
call edi
add esp, 8
test eax, eax
je 0x40c5cb
push str..tgz
push esi
call edi
add esp, 8
test eax, eax
jne 0x40c5d3
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x84], 0
mov byte [ebx + 0x80], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x90], 0
mov dword [ebx + 0x74], 0
test eax, eax
jne 0x40c634
mov esi, 0x10000
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x40c671
mov esi, 0x200
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
push ecx
push eax
mov ecx, ebx
call fcn.0040be20
mov esi, eax
test esi, esi
je 0x40c6a3
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 0x104
lea eax, [esp + 0x174]
mov byte [ebx + 0x80], 1
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x3c4]
mov dword [esp + 0x390], 0
push eax
push 0
push 0xfde9
mov byte [esp + 0x78], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x168]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c6f0
mov byte [esp + 0x26c], al
sub ecx, edx
xor eax, eax
mov dword [esp + 0x38], ecx
cmp dword [ebx], 0
mov word [esp + 0x4a], ax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0x28], eax
mov eax, 8
mov dword [esp + 0x164], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x370], 1
mov dword [esp + 0x378], 0
mov dword [esp + 0x20], 0x140b17
mov dword [esp + 0x2c], 0
mov word [esp + 0x24], ax
je 0x40c764
mov eax, 9
mov word [esp + 0x24], ax
mov word [esp + 0x4c], ax
mov eax, dword [esp + 0x14]
movzx ecx, ax
mov dword [esp + 0x10], ecx
mov word [esp + 0x26], cx
mov ecx, dword [ebx + 0x70]
test eax, eax
jne 0x40c78d
test ecx, ecx
js 0x40c78d
lea eax, [edi + ecx]
mov dword [esp + 0x30], eax
jmp 0x40c795
mov dword [esp + 0x30], 0
xor eax, eax
mov edx, dword [ebx + 0x5c]
mov word [esp + 0x48], ax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x18]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x384]
mov dword [esp + 0x15c], eax
lea eax, [esp + 0x398]
mov dword [esp + 0x160], eax
movzx eax, byte [ebx + 0x58]
mov byte [esp + 0x389], al
mov eax, edx
mov dword [esp + 0x34], ecx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 8
mov dword [esp + 0x384], 0xd5455
mov byte [esp + 0x38a], cl
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov edx, dword [ebx + 0x54]
mov dword [esp + 0x18], eax
mov byte [esp + 0x38c], al
movzx eax, byte [ebx + 0x50]
mov byte [esp + 0x38d], al
mov eax, edx
mov byte [esp + 0x38b], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 8
mov byte [esp + 0x388], 7
mov byte [esp + 0x38e], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x50]
movq xmm0, qword [esp + 0x384]
shrd eax, edx, 0x18
mov edx, dword [ebx + 0x64]
mov byte [esp + 0x390], al
movzx eax, byte [ebx + 0x60]
mov byte [esp + 0x391], al
mov eax, edx
mov byte [esp + 0x38f], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 8
movq qword [esp + 0x398], xmm0
mov byte [esp + 0x392], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x60]
shrd eax, edx, 0x18
mov byte [esp + 0x393], cl
lea ecx, [esp + 0x20]
mov byte [esp + 0x394], al
mov eax, dword [esp + 0x18]
push ebx
mov dword [esp + 0x40], 0x11
mov dword [esp + 0x44], 9
mov byte [esp + 0x3a4], al
mov byte [esp + 0x39e], 5
call fcn.0040ae80
add esp, 4
test eax, eax
je 0x40c918
cmp byte [ebx + 0x80], 0
je 0x40c8ef
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x40c8ef
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], eax
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0x38]
add eax, 0x1e
add eax, dword [esp + 0x3c]
add dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40c96b
cmp byte [ebx + 0x80], 0
je 0x40c947
mov ecx, dword [ebx + 0x7c]
test ecx, ecx
je 0x40c947
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebx + 0x30], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
mov edx, dword [ebx]
test edx, edx
je 0x40c9d3
mov al, byte [edx]
test al, al
je 0x40c9d3
mov ecx, dword [ebx + 0x30]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x414ee0]
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 + 0x414ee0]
mov dword [ebx + 0x38], ecx
add edx, 1
jne 0x40c986
cmp byte [0x41963c], 0
jne 0x40c9f6
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
mov edi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xor esi, esi
nop
call edi
sar eax, 7
mov byte [esp + esi + 0x3a4], al
inc esi
cmp esi, 0xc
jl 0x40ca00
mov eax, dword [esp + 0x28]
shr eax, 8
xor edi, edi
mov byte [esp + 0x3af], al
mov al, byte [esp + edi + 0x3a4]
mov ecx, dword [ebx + 0x30]
mov byte [esp + 0xf], al
movsx eax, al
xor eax, ecx
mov edx, dword [ebx + 0x38]
movzx eax, al
mov esi, edx
shr ecx, 8
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x414ee0]
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 + 0x414ee0]
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 + 0x3a4], al
inc edi
cmp edi, 0xc
jl 0x40ca22
mov eax, dword [ebx]
test eax, eax
je 0x40cab3
push 0xc
lea eax, [esp + 0x3a8]
mov ecx, ebx
push eax
call fcn.0040bca0
add dword [ebx + 0x18], 0xc
mov eax, dword [ebx]
mov edi, dword [esp + 0x14]
xor esi, esi
test eax, eax
setne al
mov byte [ebx + 0x2d], al
cmp edi, 8
jne 0x40cad6
lea eax, [esp + 0x20]
mov ecx, ebx
push eax
call fcn.0040c090
mov esi, eax
jmp 0x40cb34
test edi, edi
jne 0x40cb34
push 0x4000
lea edi, [ebx + 0x94]
mov dword [esp + 0x1c], esi
push edi
mov ecx, ebx
call fcn.0040bfb0
mov esi, eax
test esi, esi
je 0x40cb24
cmp esi, 0xffffffff
je 0x40cb24
push esi
push edi
mov ecx, ebx
call fcn.0040bca0
cmp eax, esi
jne 0x40cc08
add dword [esp + 0x18], esi
mov ecx, ebx
push 0x4000
push edi
call fcn.0040bfb0
mov esi, eax
test esi, esi
jne 0x40caf7
mov eax, dword [esp + 0x18]
xor esi, esi
mov dword [ebx + 0x90], eax
mov edi, dword [esp + 0x14]
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x40cb4f
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x40cb4f
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 0x40c901
test esi, esi
jne 0x40c8fc
add ecx, dword [esp + 0x1c]
cmp dword [esp + 0x30], ecx
mov eax, dword [ebx + 0x78]
sete byte [esp + 0xf]
mov dword [esp + 0x2c], eax
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
je 0x40cd02
cmp dword [ebx], esi
jne 0x40cd02
mov eax, dword [esp + 0x10]
mov word [esp + 0x26], ax
mov ax, word [esp + 0x24]
test al, 1
jne 0x40cbc5
mov ecx, 0xfff7
and ax, cx
mov word [esp + 0x24], ax
mov edx, dword [ebx + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov word [esp + 0x4c], ax
mov eax, dword [esp + 0x54]
sub eax, edx
cmp dword [ebx + 0x20], 0
je 0x40cc17
cmp eax, dword [ebx + 0x28]
jb 0x40cc12
mov eax, 0x30000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov esi, 0x60000
jmp 0x40cb30
mov dword [ebx + 0x24], eax
jmp 0x40cc2c
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40ccde
push 0
push 0
add eax, edx
push eax
push ecx
call esi
push ebx
lea ecx, [esp + 0x24]
call fcn.0040ae80
add esp, 4
test eax, eax
jne 0x40c8fc
mov ecx, dword [ebx + 0x18]
cmp byte [ebx + 0x1c], al
jne 0x40cc6c
mov dword [ebx + 0x14], 0x2000000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebx + 0x20], 0
je 0x40cca2
cmp ecx, dword [ebx + 0x28]
jb 0x40cc9a
mov dword [ebx + 0x14], 0x30000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebx + 0x24], ecx
jmp 0x40cd43
mov edx, dword [ebx + 4]
test edx, edx
je 0x40ccbb
mov eax, dword [ebx + 0x10]
push 0
push 0
add eax, ecx
push eax
push edx
call esi
jmp 0x40cd43
mov dword [ebx + 0x14], 0x1000000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x1000000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0x10]
cmp word [esp + 0x26], ax
jne 0x40cded
test edi, edi
jne 0x40cd20
cmp byte [esp + 0xf], 0
je 0x40cded
push ebx
lea ecx, [esp + 0x24]
call fcn.0040b160
add esp, 4
test eax, eax
jne 0x40c8fc
mov ax, word [esp + 0x4c]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x24], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x40c901
push dword [esp + 0x40]
call dword [sym.imp.mfc140u.dll_operator_1]
add esp, 4
mov esi, eax
push dword [esp + 0x40]
push dword [esp + 0x164]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [esp + 0x160], esi
push 0x360
call dword [sym.imp.mfc140u.dll_operator]
mov edx, eax
lea esi, [esp + 0x24]
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 0x40cdb8
mov dword [ebx + 0x44], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ecx + 0x35c]
test eax, eax
je 0x40cdce
mov ecx, eax
mov eax, dword [ecx + 0x35c]
test eax, eax
jne 0x40cdc2
mov dword [ecx + 0x35c], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x5bc]
mov eax, 0x4000000
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0x10