Function at 0x404550
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push edi
xor edi, edi
cmp ebx, edi
jne 0x40456c
pop edi
mov eax, 0xffffff9a
pop ebx
add esp, 0x14
ret 0x14
cmp dword [ebx + 0x38], edi
je 0x40455f
cmp dword [ebx + 0x9c], edi
je 0x40457f
push ebx
call fcn.00404260
push esi
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x18]
push edx
mov esi, ebx
call fcn.00403e20
add esp, 0xc
test eax, eax
je 0x4045ab
pop esi
pop edi
mov eax, 0xffffff99
pop ebx
add esp, 0x14
ret 0x14
push ebp
push 0x90
call sub.MSVCRT.dll_malloc
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x4045f7
push 0x4000
call sub.MSVCRT.dll_malloc
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
mov dword [ebp + 0x48], edx
mov edx, dword [esp + 0x38]
add esp, 4
cmp eax, edi
mov dword [ebp], eax
mov dword [ebp + 0x44], ecx
mov dword [ebp + 0x4c], edi
mov dword [ebp + 0x8c], edx
jne 0x404606
push ebp
call sub.MSVCRT.dll_free
add esp, 4
pop ebp
pop esi
pop edi
mov eax, 0xffffff98
pop ebx
add esp, 0x14
ret 0x14
mov eax, dword [esp + 0x2c]
cmp eax, edi
mov dword [ebp + 0x40], edi
je 0x404616
mov ecx, dword [ebx + 0x54]
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
cmp ecx, edi
je 0x40464f
mov dword [ecx], 6
mov eax, dword [ebx + 0x50]
and eax, 6
sub eax, 2
je 0x404649
sub eax, 2
je 0x404641
sub eax, 2
jne 0x40464f
mov dword [ecx], 1
jmp 0x40464f
mov dword [ecx], 2
jmp 0x40464f
mov dword [ecx], 9
mov eax, dword [ebx + 0x5c]
mov dword [ebp + 0x50], edi
mov dword [ebp + 0x54], eax
mov ecx, dword [ebx + 0x54]
mov dword [ebp + 0x84], ecx
mov eax, dword [ebx + 0x20]
mov dword [ebp + 0x80], eax
lea edi, [ebp + 0x60]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x2c]
xor edi, edi
mov dword [ebp + 0x88], ecx
mov dword [ebp + 0x18], edi
cmp dword [ebx + 0x54], 8
jne 0x4046bd
cmp edx, edi
jne 0x4046bd
push 0x38
push section..rdata
lea eax, [ebp + 4]
push 0xfffffffffffffff1
push eax
mov dword [ebp + 0x24], edi
mov dword [ebp + 0x28], edi
mov dword [ebp + 0x2c], edi
mov dword [eax], edi
mov dword [ebp + 8], edi
call fcn.00404ea0
mov esi, eax
cmp esi, edi
jne 0x404797
mov dword [ebp + 0x40], 1
mov edx, dword [ebx + 0x60]
mov dword [ebp + 0x58], edx
mov eax, dword [ebx + 0x64]
mov edx, dword [esp + 0x14]
mov dword [ebp + 0x5c], eax
mov ecx, dword [ebx + 0x98]
lea eax, [ecx + edx + 0x1e]
mov dword [ebp + 0x3c], eax
mov dword [ebp + 8], edi
mov dword [ebx + 0x9c], ebp
mov ebp, dword [esp + 0x38]
cmp ebp, edi
je 0x40478b
call fcn.00406710
lea esi, [ebx + 0xa4]
mov ecx, esi
mov edx, ebp
mov dword [ebx + 0xb0], eax
call fcn.004035d0
mov eax, dword [ebx + 0x9c]
mov ecx, dword [eax + 0x88]
add ecx, dword [eax + 0x3c]
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
push edi
push ecx
mov ecx, dword [ebx + 0x10]
push edx
push eax
call ecx
add esp, 0x10
test eax, eax
jne 0x4045f7
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
push 0xc
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ebx + 4]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, 0xc
jb 0x4045f7
xor ebp, ebp
mov eax, esi
call fcn.00403570
xor byte [esp + ebp + 0x18], al
movsx eax, byte [esp + ebp + 0x18]
mov edi, dword [ebx + 0xb0]
call fcn.00403590
add ebp, 1
cmp ebp, 0xc
jl 0x404754
mov eax, dword [ebx + 0x9c]
add dword [eax + 0x3c], 0xc
mov dword [ebx + 0xa0], 1
pop ebp
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x14
ret 0x14
push ebp
call sub.MSVCRT.dll_free
add esp, 4
pop ebp
mov eax, esi
pop esi
pop edi
pop ebx
add esp, 0x14
ret 0x14