Function at 0x409e69
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4cc557
mov eax, dword fs:[0]
push eax
sub esp, 0x350
mov eax, dword [0x5107c0]
xor eax, esp
mov dword [esp + 0x348], eax
push ebx
push esi
push edi
mov eax, dword [0x5107c0]
xor eax, esp
push eax
lea eax, [esp + 0x360]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x28], esi
mov eax, dword [ebp + 0xc]
xor edi, edi
cmp byte [esi + 0x311], 0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edi
je 0x40a06e
cmp byte [esi + 0x312], 0
je 0x409f22
push 0x5c
call fcn.004b3d9e
pop ecx
mov dword [esp + 0x1c], eax
and dword [esp + 0x368], edi
test eax, eax
je 0x409ef8
mov ecx, eax
call fcn.0041ed0b
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x409efe
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x368], 0xffffffff
movzx ecx, word [ebp + 8]
mov eax, dword [ebx]
add ecx, 0xffffffbf
push ecx
mov ecx, ebx
call dword [eax + 4]
mov edi, dword [esp + 0x18]
mov byte [esp + 0x17], al
jmp 0x40a031
push 0x50
call fcn.004b3d9e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x368], 1
test eax, eax
je 0x409f4c
mov ecx, eax
call fcn.0043fb09
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x409f52
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x368], 0xffffffff
movzx ecx, word [ebp + 8]
mov eax, dword [ebx]
add ecx, 0xffffffbf
push ecx
mov ecx, ebx
call dword [eax + 4]
mov byte [esp + 0x17], al
test al, al
je 0x40a426
mov esi, dword [ebx + 4]
lea eax, [esp + 0x38]
push 0x10
push 7
push eax
push esi
call fcn.0041f113
add esp, 0x10
lea eax, [esp + 0x1c]
push 0
push eax
push 0x14
lea eax, [esp + 0x44]
push eax
push 0x10
push eax
push 0x221d80
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x409fb2
cmp dword [esp + 0x48], 2
je 0x40a029
mov ecx, dword [0x521818]
lea eax, [esp + 0x4c]
mov esi, 0x80
push esi
push eax
push 0x15
call fcn.0041c148
test eax, eax
jne 0x409fed
movzx edx, word [0x5171f8]
lea eax, [esp + 0x4c]
push esi
push eax
xor edx, 0xc7c7
mov ecx, 0x5171fa
call fcn.00415bfb
pop ecx
pop ecx
movzx eax, word [ebp + 8]
push eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x14c]
push 0x10
push 0x4e8940
push eax
push dword [esp + 0x38]
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
mov byte [esp + 0x17], al
jmp 0x40a02d
mov al, byte [esp + 0x17]
mov esi, dword [esp + 0x28]
test al, al
je 0x40a426
lea eax, [esi + 0x554]
mov ecx, ebx
push eax
call fcn.004412c1
mov byte [esp + 0x17], al
lea edx, [esi + 0x554]
test al, al
je 0x40a063
mov eax, dword [edx]
test eax, eax
je 0x40a063
inc eax
mov dword [edx], eax
jmp 0x40a164
xor al, al
mov byte [esp + 0x17], al
jmp 0x40a168
push 0x50
call fcn.004b3d9e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x368], 2
test eax, eax
je 0x40a098
mov ecx, eax
call fcn.0043fb09
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x40a09e
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x368], 0xffffffff
movzx ecx, word [ebp + 8]
mov eax, dword [ebx]
add ecx, 0xffffffbf
push ecx
mov ecx, ebx
call dword [eax + 4]
mov byte [esp + 0x17], al
test al, al
je 0x40a426
push 0x17c
call fcn.004b3d9e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x368], 3
test eax, eax
je 0x40a0ee
mov ecx, eax
call fcn.00441fb0
mov edi, eax
mov dword [esp + 0x18], eax
jmp 0x40a0f4
xor edi, edi
mov dword [esp + 0x18], edi
or dword [esp + 0x368], 0xffffffff
mov ecx, edi
push 0
push ebx
call fcn.0044265a
test al, al
je 0x40a12f
push 0
push 0
mov ecx, edi
call fcn.00442453
test eax, eax
je 0x40a12f
lea edx, [esi + 0x554]
mov ecx, eax
and dword [edx], 0
call fcn.00409de2
mov dword [esi + 0x55c], eax
cmp dword [esi + 0x554], 0
jne 0x40a15e
test edi, edi
je 0x40a14a
mov ecx, edi
call fcn.00442092
push edi
call fcn.004b3d99
pop ecx
xor edi, edi
lea edx, [esi + 0x554]
xor al, al
mov dword [esp + 0x18], edi
mov byte [esp + 0x17], al
jmp 0x40a168
lea edx, [esi + 0x554]
mov al, byte [esp + 0x17]
test al, al
je 0x40a414
mov edx, dword [edx]
lea eax, [esi + 0x34c]
xor ecx, ecx
shld ecx, edx, 0xb
push eax
shl edx, 0xb
push ecx
mov ecx, dword [esp + 0x34]
push edx
lea edx, [esi + 0x102]
call fcn.00409ce6
add esp, 0xc
test eax, eax
jne 0x40a1a1
xor al, al
jmp 0x40a446
mov ax, word [ebp + 8]
movzx eax, al
mov ecx, dword [eax*4 + 0x5217fc]
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x40a3ed
mov al, byte [ecx + 0x81]
mov byte [esi + 0x313], al
mov al, byte [ecx + 0x82]
mov byte [esi + 0x314], al
test dword [ecx + 0x1c8], 0x4000
je 0x40a1fe
push 0x10
lea edi, [esi + 0x316]
lea edx, [ecx + 0x1f8]
pop ebx
mov al, byte [edx + 0x14]
xor al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ebx
jne 0x40a1ee
mov ebx, dword [esp + 0x24]
mov eax, dword [ecx + 0x1c8]
mov edi, dword [esp + 0x28]
add edi, 0x326
shr eax, 0xe
and al, 1
mov byte [esi + 0x315], al
lea esi, [ecx + 0x1dc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
cmp byte [edi + 0x313], 0
je 0x40a3f5
cmp byte [edi + 0x312], 0
je 0x40a3f5
test esi, esi
jne 0x40a3f5
push 0x17c
call fcn.004b3d9e
pop ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x368], 4
test eax, eax
je 0x40a27a
mov ecx, eax
call fcn.00441fb0
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x40a280
xor esi, esi
mov dword [esp + 0x18], esi
or dword [esp + 0x368], 0xffffffff
mov ecx, esi
push 0
push ebx
call fcn.0044265a
test al, al
je 0x40a3f5
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x70], 0x16
je 0x40a2bd
cmp dword [eax + 0x70], 0xb
je 0x40a2bd
push 0
push 0x20c5be91
mov edx, 0x414ba51
mov ecx, 0xed5d3475
jmp 0x40a2ce
push 0
push 0xbef43b9b
mov edx, 0x9a253f5b
mov ecx, 0x736cb171
call fcn.004013a4
pop ecx
push eax
mov ecx, esi
call fcn.00442453
mov edx, eax
test edx, edx
je 0x40a3f5
lea ecx, [edi + 0x338]
mov eax, dword [ecx]
mov dword [ecx + 4], eax
mov eax, dword [edx]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
test eax, eax
je 0x40a3c5
mov edi, ecx
mov esi, eax
lea eax, [esi + 0x38]
push 0x2e
push eax
call fcn.004b4ac0
mov dword [esp + 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x40a3aa
push 0x3513ec36
mov edx, 0x11c2e8ff
mov ecx, 0xf88b66c9
call fcn.004013a4
pop ecx
mov ecx, dword [esp + 0x20]
inc ecx
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x40a35a
test dl, dl
je 0x40a356
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x40a35a
add ecx, 2
add eax, 2
test dl, dl
jne 0x40a33a
xor eax, eax
jmp 0x40a35f
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40a3aa
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jbe 0x40a3aa
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov eax, dword [esi + 0x34]
add eax, ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add eax, 0x7ff
mov dword [esp + 0x30], ecx
shr eax, 0xb
dec ecx
add eax, ecx
mov ecx, edi
mov dword [esp + 0x34], eax
lea eax, [esp + 0x30]
push eax
call fcn.0040ac66
mov ecx, dword [esp + 0x20]
inc ebx
add ecx, 0xc
mov dword [esp + 0x20], ecx
cmp ebx, dword [esi + 0x30]
jb 0x40a370
mov esi, dword [esi + 4]
test esi, esi
jne 0x40a307
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
sar eax, 3
test eax, eax
je 0x40a3f5
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
push 0x409e26
push 8
sar eax, 3
push eax
push dword [ecx]
call fcn.004b4af0
add esp, 0x10
jmp 0x40a3f5
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
mov ax, word [ebp + 8]
mov word [edi], ax
mov eax, dword [esp + 0x2c]
mov dword [edi + 0x30c], eax
mov dword [edi + 0x56c], ebx
mov dword [edi + 0x574], esi
jmp 0x40a442
test edi, edi
je 0x40a426
mov ecx, edi
call fcn.00442092
push edi
call fcn.004b3d99
pop ecx
mov ecx, ebx
call fcn.0044003c
push ebx
call fcn.004b3d99
pop ecx
mov ecx, ebx
call fcn.0044003c
push ebx
call fcn.004b3d99
pop ecx
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x360]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x348]
xor ecx, esp
call fcn.004b35e5
mov esp, ebp
pop ebp
ret 8