Function at 0x4126ec
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2820
mov eax, dword fs:[0]
push eax
sub esp, 0x948
mov eax, dword [0x517490]
xor eax, esp
mov dword [esp + 0x940], eax
push ebx
push esi
push edi
mov eax, dword [0x517490]
xor eax, esp
push eax
lea eax, [esp + 0x958]
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 0x4128f1
cmp byte [esi + 0x312], 0
je 0x4127a5
push 0x5c
call fcn.004b9c6e
pop ecx
mov dword [esp + 0x1c], eax
and dword [esp + 0x960], edi
test eax, eax
je 0x41277b
mov ecx, eax
call fcn.00423b5c
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x412781
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x960], 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 0x4128b4
push 0x50
call fcn.004b9c6e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x960], 1
test eax, eax
je 0x4127cf
mov ecx, eax
call fcn.00448d29
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x4127d5
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x960], 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 0x412cce
mov esi, dword [ebx + 4]
lea eax, [esp + 0x38]
push 0x10
push 7
push eax
push esi
call fcn.00424026
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 0x412835
cmp dword [esp + 0x48], 2
je 0x4128ac
mov ecx, dword [0x529a90]
lea eax, [esp + 0x4c]
mov esi, 0x80
push esi
push eax
push 0x15
call fcn.00420e3f
test eax, eax
jne 0x412870
movzx edx, word [0x51e748]
lea eax, [esp + 0x4c]
push esi
push eax
xor edx, 0x2525
mov ecx, 0x51e74a
call fcn.00412531
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 0x4ee5d0
push eax
push dword [esp + 0x38]
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
mov byte [esp + 0x17], al
jmp 0x4128b0
mov al, byte [esp + 0x17]
mov esi, dword [esp + 0x28]
test al, al
je 0x412cce
lea eax, [esi + 0x554]
mov ecx, ebx
push eax
call fcn.0044808d
mov byte [esp + 0x17], al
lea edx, [esi + 0x554]
test al, al
je 0x4128e6
mov eax, dword [edx]
test eax, eax
je 0x4128e6
inc eax
mov dword [edx], eax
jmp 0x4129e7
xor al, al
mov byte [esp + 0x17], al
jmp 0x4129eb
push 0x50
call fcn.004b9c6e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x960], 2
test eax, eax
je 0x41291b
mov ecx, eax
call fcn.00448d29
mov ebx, eax
mov dword [esp + 0x24], eax
jmp 0x412921
xor ebx, ebx
mov dword [esp + 0x24], ebx
or dword [esp + 0x960], 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 0x412cce
push 0x17c
call fcn.004b9c6e
pop ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x960], 3
test eax, eax
je 0x412971
mov ecx, eax
call fcn.00444d4d
mov edi, eax
mov dword [esp + 0x18], eax
jmp 0x412977
xor edi, edi
mov dword [esp + 0x18], edi
or dword [esp + 0x960], 0xffffffff
mov ecx, edi
push 0
push ebx
call fcn.00445664
test al, al
je 0x4129b2
push 0
push 0
mov ecx, edi
call fcn.0044545d
test eax, eax
je 0x4129b2
lea edx, [esi + 0x554]
mov ecx, eax
and dword [edx], 0
call fcn.00412665
mov dword [esi + 0x55c], eax
cmp dword [esi + 0x554], 0
jne 0x4129e1
test edi, edi
je 0x4129cd
mov ecx, edi
call fcn.00444e5d
push edi
call fcn.004b9c69
pop ecx
xor edi, edi
lea edx, [esi + 0x554]
xor al, al
mov dword [esp + 0x18], edi
mov byte [esp + 0x17], al
jmp 0x4129eb
lea edx, [esi + 0x554]
mov al, byte [esp + 0x17]
test al, al
je 0x412cbc
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.00412569
add esp, 0xc
test eax, eax
jne 0x412a24
xor al, al
jmp 0x412cee
mov ax, word [ebp + 8]
movzx eax, al
mov ecx, dword [eax*4 + 0x529a6c]
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x412c95
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 0x412a81
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 0x412a71
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 0x412c9d
cmp byte [edi + 0x312], 0
je 0x412c9d
test esi, esi
jne 0x412c9d
push 0x17c
call fcn.004b9c6e
pop ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x960], 4
test eax, eax
je 0x412afd
mov ecx, eax
call fcn.00444d4d
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x412b03
xor esi, esi
mov dword [esp + 0x18], esi
or dword [esp + 0x960], 0xffffffff
mov ecx, esi
push 0
push ebx
call fcn.00445664
test al, al
je 0x412c9d
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x70], 0x16
je 0x412b40
cmp dword [eax + 0x70], 0xb
je 0x412b40
push 0
push 0x9e38cf75
mov edx, 0x8395a2
mov ecx, 0x96730801
jmp 0x412b51
push 0
push 0x8db89943
mov edx, 0x1303c394
mov ecx, 0x85f35e39
call fcn.00401709
pop ecx
push eax
mov ecx, esi
call fcn.0044545d
mov edx, eax
test edx, edx
je 0x412c9d
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 0x412c6d
mov edi, eax
mov esi, ecx
lea eax, [edi + 0x38]
push 0x2e
push eax
call fcn.004ba830
mov dword [esp + 0x28], eax
pop ecx
pop ecx
test eax, eax
je 0x412c56
push 0x3927d1b8
mov edx, 0xa79c8b66
mov ecx, 0x316c16d7
call fcn.00401709
pop ecx
mov ecx, dword [esp + 0x20]
inc ecx
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x412bdd
test dl, dl
je 0x412bd9
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x412bdd
add ecx, 2
add eax, 2
test dl, dl
jne 0x412bbd
xor eax, eax
jmp 0x412be2
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412c56
cmp dword [edi + 0x30], eax
jbe 0x412c56
lea eax, [esp + 0x14c]
mov ecx, ebx
push eax
mov eax, dword [edi + 0x34]
push 1
push dword [eax]
call fcn.00447fdd
test byte [esp + 0x14c], 0xc0
je 0x412c56
and dword [esp + 0x20], 0
cmp dword [edi + 0x30], 0
jbe 0x412c56
xor ebx, ebx
mov eax, dword [edi + 0x34]
mov ecx, dword [eax + ebx]
mov eax, dword [eax + ebx + 4]
add eax, 0x7ff
mov dword [esp + 0x30], ecx
shr eax, 0xb
dec ecx
add eax, ecx
mov ecx, esi
mov dword [esp + 0x34], eax
lea eax, [esp + 0x30]
push eax
call fcn.00413487
mov eax, dword [esp + 0x20]
lea ebx, [ebx + 0xc]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [edi + 0x30]
jb 0x412c18
mov ebx, dword [esp + 0x24]
mov edi, dword [edi + 4]
test edi, edi
jne 0x412b8a
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 0x412c9d
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
push 0x4126a9
push 8
sar eax, 3
push eax
push dword [ecx]
call fcn.004bb210
add esp, 0x10
jmp 0x412c9d
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 0x412cea
test edi, edi
je 0x412cce
mov ecx, edi
call fcn.00444e5d
push edi
call fcn.004b9c69
pop ecx
mov ecx, ebx
call fcn.00446e08
push ebx
call fcn.004b9c69
pop ecx
mov ecx, ebx
call fcn.00446e08
push ebx
call fcn.004b9c69
pop ecx
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x958]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x940]
xor ecx, esp
call fcn.004b94b6
mov esp, ebp
pop ebp
ret 8