Function at 0x408558
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff004
push eax
add esp, 0xfffffda4
mov edi, edx
mov esi, eax
test edi, edi
je 0x4088f4
mov eax, 0xde0
call fcn.0040d8a4
push eax
call fcn.00426660
pop ecx
xor edx, edx
or word [esi + 0x3eac], 0x40
mov eax, dword [esi + 0x65d8]
push edx
add eax, 7
xor edx, edx
push eax
mov eax, esi
call fcn.00403504
xor ecx, ecx
mov edx, 0x73
mov eax, esi
call fcn.00406a8c
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.00403504
mov eax, esi
call fcn.004035bc
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp]
mov dword [esp + 8], edx
mov edx, dword [esp + 4]
mov dword [esp + 0xc], edx
push dword [esp + 4]
push dword [esp + 4]
mov eax, edi
call fcn.00408900
mov dword [esp + 0x10], 0
lea ebx, [esi + 0x4be4]
mov edi, eax
mov dword [esp + 0x14], 0
lea eax, [ebx + 0xc30]
mov edx, 0x14
call fcn.004068ac
mov word [ebx + 8], 0x8000
xor ecx, ecx
mov eax, esi
mov dword [ebx + 0x24], ecx
xor ecx, ecx
or word [esi + 0x4bec], 0x4000
push 0
push 0x43d261
push 0
xor edx, edx
call fcn.004081d4
push 0
push 0
xor edx, edx
mov eax, esi
call fcn.00403504
xor ecx, ecx
xor ebx, ebx
mov edx, edi
mov dword [esp + 0x18], ecx
shl edx, 9
lea eax, [esp + 0x1020]
call fcn.00403994
push dword [esp + 0x1024]
push 0
push dword [esp + 0x1028]
call fcn.004353e8
add esp, 0xc
mov dword [esp + 0x1c], 0xfffffff
jmp 0x4087ad
call fcn.0040ac6c
cmp dword [esp + 4], 0
jne 0x4086a0
cmp dword [esp], 0x200
jae 0x4086d4
jmp 0x4086a2
jge 0x4086d4
mov eax, dword [esp]
mov ebp, eax
mov eax, pe_nt_image_headers32
sub eax, ebp
push eax
push 0
lea edx, [esp + 0x1034]
add edx, ebp
push edx
call fcn.004353e8
add esp, 0xc
mov dword [esp], 0
mov dword [esp + 4], 0
jmp 0x4086e5
mov ebp, pe_nt_image_headers32
sub dword [esp], 0x200
sbb dword [esp + 4], 0
lea edx, [esp + 0x102c]
mov ecx, ebp
mov eax, esi
call fcn.004033a0
mov edx, dword [esp + 0x18]
shl edx, 9
add edx, dword [esp + 0x1020]
xor eax, eax
mov cl, byte [esp + eax + 0x102c]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x408705
lea edx, [esp + 0x102c]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.0040b0a0
mov byte [esp + ebx + 0x20], al
inc ebx
shr eax, 8
mov byte [esp + ebx + 0x20], al
inc ebx
cmp ebx, 0x1000
jne 0x408791
lea eax, [esp + 0x122c]
mov edx, esi
call fcn.00402d2c
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.00403504
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, esi
call fcn.00403218
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
call fcn.0040b0a0
mov dword [esp + 0x1c], eax
xor ebx, ebx
lea eax, [esp + 0x122c]
mov edx, 2
call fcn.00402d50
add dword [esp + 0x10], 1
adc dword [esp + 0x14], 0
inc dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
cmp ecx, edi
jb 0x4087ad
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esp + 4], 0
jne 0x4087c0
cmp dword [esp], 0
ja 0x408689
jmp 0x4087c6
jg 0x408689
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.00403504
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, esi
call fcn.00403218
lea edx, [esp + 0x20]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
call fcn.0040b0a0
mov dword [esp + 0x1c], eax
mov ebx, edi
shl ebx, 9
mov ecx, ebx
mov edx, dword [esp + 0x1020]
mov eax, esi
call fcn.00403218
mov ecx, ebx
mov edx, dword [esp + 0x1020]
mov eax, dword [esp + 0x1c]
call fcn.0040b0a0
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
not eax
mov dword [esi + 0x4bfc], eax
mov eax, esi
push dword [esp + 0xc]
push dword [esp + 0xc]
xor edx, edx
call fcn.00403504
lea eax, [esp + 0x123c]
xor edx, edx
call fcn.00415bd8
mov edx, 0x43d264
lea eax, [esp + 0x123c]
mov ecx, 8
call fcn.00415d7c
lea eax, [esp + 0x123c]
mov ebx, edi
mov edx, ebx
call fcn.00415d04
push dword [esp + 0x14]
push dword [esp + 0x14]
lea eax, [esp + 0x1244]
call fcn.00415d54
lea edx, [esi + 0x5814]
lea eax, [esp + 0x123c]
call fcn.00415e44
push 0
push 0x43d261
push 0
push 0
push 2
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
call fcn.0043826c
shl ebx, 9
mov ecx, eax
add ecx, ebx
xor edx, edx
mov eax, esi
call fcn.004081d4
push 0
push 0
mov edx, 2
mov eax, esi
call fcn.00403504
lea eax, [esp + 0x123c]
mov edx, 2
call fcn.00415c0c
lea eax, [esp + 0x1020]
mov edx, 2
call fcn.00401244
add esp, 0x125c
pop ebp
pop edi
pop esi
pop ebx
ret