Function at 0x494fc1
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ecx, 0xffffff9a
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [ebp + 0x10]
cmp dword [ebp + 8], 0
je 0x49569d
cmp dword [ebp + 0x28], 0
setne dl
xor eax, eax
cmp dword [ebp + 0x28], 8
setne al
test edx, eax
jne 0x49569d
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2c], 1
jne 0x495010
push eax
call fcn.00494fb0
mov edi, eax
pop eax
mov ecx, edi
test edi, edi
jne 0x49569d
cmp dword [ebp + 0xc], 0
jne 0x49501d
mov dword [ebp + 0xc], 0x6000cf
mov dword [ebp - 0x30], 0
cmp dword [ebp + 0x24], 0
je 0x49503b
cld
or ecx, 0xffffffff
xor eax, eax
mov edi, dword [ebp + 0x24]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x30], ecx
cld
or ecx, 0xffffffff
xor eax, eax
mov edi, dword [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
test esi, esi
lea ebx, [ecx - 1]
jne 0x49505e
mov edx, dword [ebp + 8]
mov dword [edx + 0x4088], 0
jmp 0x4950bb
mov eax, dword [esi + 0x18]
test eax, eax
je 0x495070
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4088], eax
jmp 0x4950bb
mov edx, dword [esi + 0x14]
cmp edx, 0x7bc
jbe 0x495083
sub edx, 0x7bc
jmp 0x49508b
cmp edx, 0x50
jbe 0x49508b
sub edx, 0x50
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
shl eax, 5
shl edx, 9
add eax, dword [esi + 0xc]
shr ecx, 1
lea eax, [eax + edx + 0x20]
mov edx, dword [esi + 8]
shl edx, 6
shl eax, 0x10
add edx, dword [esi + 4]
shl edx, 5
add edx, ecx
or eax, edx
mov edx, dword [ebp + 8]
mov dword [edx + 0x4088], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x2c]
sub eax, 8
mov dword [ecx + 0x7c], 0
cmp eax, 1
ja 0x4950d7
mov dword [ecx + 0x7c], 2
cmp dword [ebp + 0x2c], 2
jne 0x4950e6
mov eax, dword [ebp + 8]
or dword [eax + 0x7c], 4
jmp 0x4950f3
cmp dword [ebp + 0x2c], 1
jne 0x4950f3
mov edx, dword [ebp + 8]
or dword [edx + 0x7c], 6
cmp dword [ebp + 0x40], 0
je 0x495100
mov ecx, dword [ebp + 8]
or dword [ecx + 0x7c], 1
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x28]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x80], edx
mov dword [eax + 0x408c], 0
mov dword [eax + 0x4090], 0
mov dword [eax + 0x68], 0
mov dword [eax + 0x6c], 0
mov eax, dword [ebp + 0x30]
mov dword [ecx + 0x84], eax
push dword [ecx + 0x20]
push dword [ecx + 0x1c]
call dword [ecx + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
mov dword [edx + 0x70], eax
mov edx, dword [ebp - 0x30]
lea eax, [ebx + ecx]
mov ecx, dword [ebp + 8]
lea eax, [eax + edx + 0x2e]
mov dword [ecx + 0x78], eax
push eax
call sub.msvcrt.dll_malloc
mov edx, dword [ebp + 8]
mov dword [edx + 0x74], eax
mov edx, 0x2014b50
push 4
call fcn.00494510
mov ecx, dword [ebp + 8]
xor edx, edx
mov eax, dword [ecx + 0x74]
push 2
add eax, 4
call fcn.00494510
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
mov edx, 0x14
add eax, 6
push 2
call fcn.00494510
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, dword [ecx + 0x7c]
add eax, 8
push 2
call fcn.00494510
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x80]
mov eax, dword [eax + 0x74]
add eax, 0xa
push 2
call fcn.00494510
mov eax, dword [ebp + 8]
add esp, 0x20
mov edx, dword [eax + 0x4088]
mov eax, dword [eax + 0x74]
add eax, 0xc
push 4
call fcn.00494510
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x10
push 4
call fcn.00494510
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
xor edx, edx
add eax, 0x14
push 4
call fcn.00494510
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x18
push 4
call fcn.00494510
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, ebx
add eax, 0x1c
push 2
call fcn.00494510
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
mov edx, dword [ebp + 0x20]
add eax, 0x1e
push 2
call fcn.00494510
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, dword [ebp - 0x30]
add eax, 0x20
push 2
call fcn.00494510
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x22
push 2
call fcn.00494510
mov ecx, dword [ebp + 8]
add esp, 0x20
mov eax, dword [ecx + 0x74]
test esi, esi
jne 0x495273
add eax, 0x24
push 2
xor edx, edx
jmp 0x49527b
mov edx, dword [esi + 0x1c]
add eax, 0x24
push 2
call fcn.00494510
mov edx, dword [ebp + 8]
pop edi
test esi, esi
mov eax, dword [edx + 0x74]
jne 0x495294
add eax, 0x26
push 4
xor edx, edx
jmp 0x49529c
mov edx, dword [esi + 0x20]
add eax, 0x26
push 4
call fcn.00494510
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x70]
mov eax, dword [ecx + 0x74]
sub edx, dword [ecx + 0x40ac]
add eax, 0x2a
mov dword [esp], 4
call fcn.00494510
xor ecx, ecx
pop esi
cmp ecx, ebx
jae 0x4952d9
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x74]
mov esi, dword [ebp + 0xc]
mov al, byte [ecx + esi]
mov byte [edx + ecx + 0x2e], al
inc ecx
jmp 0x4952c2
xor ecx, ecx
cmp ecx, dword [ebp + 0x20]
jae 0x4952f5
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x1c]
mov edx, dword [eax + 0x74]
mov al, byte [ecx + esi]
add edx, ebx
mov byte [edx + ecx + 0x2e], al
inc ecx
jmp 0x4952db
xor ecx, ecx
cmp ecx, dword [ebp - 0x30]
jae 0x495315
mov edx, dword [ebp + 0x20]
mov esi, dword [ebp + 8]
lea eax, [ebx + edx]
add eax, dword [esi + 0x74]
mov esi, dword [ebp + 0x24]
mov dl, byte [ecx + esi]
mov byte [eax + ecx + 0x2e], dl
inc ecx
jmp 0x4952f7
mov eax, dword [ebp + 8]
mov ecx, 0xffffff98
cmp dword [eax + 0x74], 0
je 0x49569d
mov edx, dword [eax + 0x20]
push 4
push 0x4034b50
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x49541f
mov ecx, dword [ebp + 8]
mov eax, ecx
mov edx, dword [ecx + 0x20]
push 2
push 0x14
call fcn.004944c1
pop ecx
mov edi, eax
pop esi
test eax, eax
jne 0x49541f
mov esi, dword [ebp + 8]
mov eax, esi
mov edx, dword [esi + 0x20]
push 2
push dword [esi + 0x7c]
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x49541f
mov edx, dword [esi + 0x20]
push 2
push dword [esi + 0x80]
mov eax, esi
call fcn.004944c1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x49541f
mov edx, dword [esi + 0x20]
push 4
push dword [esi + 0x4088]
mov eax, esi
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x49541f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.004944c1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x49541f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x49541f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.004944c1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x49541f
mov edx, dword [esi + 0x20]
mov eax, esi
push 2
push ebx
call fcn.004944c1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x49541f
mov edx, dword [esi + 0x20]
push 2
push dword [ebp + 0x18]
mov eax, esi
call fcn.004944c1
pop esi
mov edi, eax
pop eax
test edi, edi
sete dl
xor eax, eax
test ebx, ebx
setne al
test edx, eax
je 0x495449
push ebx
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
push dword [eax + 0x20]
push dword [eax + 0x1c]
call dword [eax + 8]
add esp, 0x10
cmp eax, ebx
je 0x495449
or edi, 0xffffffff
test edi, edi
sete dl
xor eax, eax
cmp dword [ebp + 0x18], 0
setne al
test edx, eax
je 0x495478
push dword [ebp + 0x18]
push dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
push dword [ecx + 0x20]
push dword [ecx + 0x1c]
call dword [ecx + 8]
add esp, 0x10
cmp eax, dword [ebp + 0x18]
je 0x495478
or edi, 0xffffffff
mov esi, dword [ebp + 8]
mov eax, esi
add eax, 0x88
mov dword [esi + 0x34], 0
mov dword [esi + 0x40], 0x4000
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x44], 0
test edi, edi
jne 0x495506
cmp dword [esi + 0x80], 8
jne 0x495506
cmp dword [esi + 0x84], 0
jne 0x495506
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
mov eax, dword [ebp + 0x34]
sar eax, 0x1f
push 0x38
push 0x6000d1
xor dword [ebp + 0x34], eax
push dword [ebp + 0x3c]
push dword [ebp + 0x38]
sub eax, dword [ebp + 0x34]
push eax
push 8
push dword [ebp + 0x2c]
mov eax, esi
add eax, 0x30
push eax
call fcn.0051735b
add esp, 0x20
mov edi, eax
test eax, eax
jne 0x495506
mov dword [esi + 0x68], 1
mov eax, dword [ebp + 8]
test edi, edi
sete dl
mov dword [eax + 0x40a4], 0
xor eax, eax
cmp dword [ebp + 0x40], 0
setne al
test edx, eax
je 0x49568d
mov edx, dword [ebp + 8]
mov dword [edx + 0x4090], 1
call fcn.00518310
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ecx + 0x40a0], eax
mov eax, dword [0x622300]
add ecx, 0x4094
inc eax
mov dword [ebp - 0x38], ecx
mov dword [0x622300], eax
dec eax
jne 0x495573
push 0
call sub.msvcrt.dll_time
xor eax, 0xbb40e64e
mov dword [esp], eax
call sub.msvcrt.dll_srand
pop ecx
push dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + 0x40]
call fcn.004943a0
pop edx
mov dword [ebp - 0x3c], 0
call sub.msvcrt.dll_rand
mov edx, dword [ebp - 0x34]
mov ebx, eax
mov eax, dword [ebp - 0x38]
sar ebx, 7
call fcn.00494340
and ebx, 0xff
mov esi, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
push ebx
xor ebx, esi
call fcn.00494357
mov esi, dword [ebp - 0x3c]
mov byte [esi + ebp - 0x2c], bl
inc esi
pop eax
mov dword [ebp - 0x3c], esi
cmp esi, 9
jle 0x495589
push dword [ebp - 0x34]
mov eax, dword [ebp + 0x40]
mov edx, dword [ebp - 0x38]
call fcn.004943a0
pop eax
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
call fcn.00494340
mov edx, dword [ebp - 0x3c]
mov esi, eax
movzx eax, byte [edx + ebp - 0x2c]
mov edx, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x38]
call fcn.00494357
mov ecx, dword [ebp - 0x3c]
pop eax
movzx eax, byte [ecx + ebp - 0x2c]
xor eax, esi
mov byte [ecx + ebp - 0x1c], al
inc ecx
mov dword [ebp - 0x3c], ecx
cmp ecx, 9
jle 0x4955db
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
call fcn.00494340
mov edx, dword [ebp - 0x34]
shr dword [ebp + 0x44], 0x10
movzx ebx, byte [ebp + 0x44]
mov esi, eax
push ebx
mov eax, dword [ebp - 0x38]
xor ebx, esi
call fcn.00494357
pop eax
mov edx, dword [ebp - 0x34]
mov byte [ebp - 0x12], bl
mov eax, dword [ebp - 0x38]
call fcn.00494340
mov ebx, dword [ebp + 0x44]
mov esi, eax
mov edx, dword [ebp - 0x34]
shr ebx, 8
mov eax, dword [ebp - 0x38]
push ebx
xor ebx, esi
call fcn.00494357
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x11], bl
mov dword [esi + 0x40a4], 0xc
mov dword [esp], 0xc
push eax
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 8]
add esp, 0x10
cmp eax, 0xc
je 0x49568d
or edi, 0xffffffff
jmp 0x49569b
test edi, edi
jne 0x49569b
mov eax, dword [ebp + 8]
mov dword [eax + 0x2c], 1
mov ecx, edi
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret