Function at 0x405577
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
push 0x53000001
xor edx, edx
push esi
mov esi, dword [ebp + 0xc]
mov eax, edx
inc dword [esi]
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [esi]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], 1
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x1c], edx
cmp word [eax + 8], dx
je 0x4778fd
lea ecx, [ebp - 0x60]
call fcn.0040d3d2
mov ecx, dword [edi + 4]
mov eax, dword [esi]
push 0x7f
mov eax, dword [ecx + eax*4]
pop edx
push 0x33
mov dword [ebp - 0x48], edx
pop edx
cmp word [eax + 8], dx
push 0x7f
mov dword [ebp - 0x3c], edx
pop edx
jne 0x477bc9
mov dword [ebp - 0x50], 0x4e
mov dword [ebp - 0x64], 0x4f
mov dword [ebp - 0x4c], 0x47
mov dword [ebp - 0x44], 0x48
mov dword [ebp - 0x38], 0x40
mov eax, dword [esi]
mov eax, dword [ecx + eax*4]
lea ecx, [ebp - 0x60]
push dword [eax]
call fcn.0040c935
push dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.0040d2d2
cmp dword [ebp - 0x10], 0
jne 0x477c38
test dword [ebx], eax
pop es
add byte [eax - 0x10], ch
fisttp dword [ecx]
push 0x49dbf0
lea ecx, [ebp - 0x34]
call fcn.0040ca8e
push dword [ebp + 0x10]
lea eax, [ebp - 0x34]
push 0x100
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.0040d380
push dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.0040d2d2
inc dword [esi]
mov ecx, dword [esi]
mov eax, dword [edi + 4]
push 0x4e
mov eax, dword [eax + ecx*4]
pop ecx
cmp word [eax + 8], cx
je 0x4057bb
mov ecx, dword [esi]
mov edx, dword [edi + 4]
mov eax, dword [edx + ecx*4]
cmp word [eax + 8], 0x41
jne 0x477c2c
lea eax, [ecx + 1]
mov dword [ebp - 0xc], eax
mov dword [esi], eax
mov eax, dword [edx + eax*4]
push 0x4e
movsx ecx, word [eax + 0xa]
mov dword [ebp - 0x14], ecx
pop ecx
cmp word [eax + 8], cx
mov ecx, dword [ebp - 0x10]
push 5
je 0x477a2a
call fcn.0040d2c0
test al, al
jne 0x4057c4
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp eax, dword [edi + 8]
jae 0x40572b
push 0x7f
mov ebx, eax
pop edx
mov eax, dword [edi + 4]
mov eax, dword [eax + ebx*4]
mov dword [ebp - 0x24], eax
movzx eax, word [eax + 8]
cmp ax, dx
je 0x405728
cmp ax, word [ebp - 0x4c]
je 0x4057b8
cmp ax, word [ebp - 0x50]
je 0x4057b8
cmp ax, word [ebp - 0x44]
je 0x4057af
cmp ax, word [ebp - 0x64]
je 0x4057af
cmp ax, word [ebp - 0x38]
je 0x4057a2
cmp ax, word [ebp - 0x3c]
je 0x405782
inc ebx
cmp ebx, dword [edi + 8]
jb 0x4056d8
mov ebx, dword [ebp - 0x40]
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
push eax
push esi
push edi
mov ecx, ebx
call fcn.0040fa40
test eax, eax
js 0x4057ce
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x34]
push eax
mov byte [0x4c22e4], 0
call fcn.0040d89e
mov edx, dword [esi]
mov ecx, dword [edi + 4]
mov eax, dword [ecx + edx*4]
movzx eax, word [eax + 8]
cmp ax, word [ebp - 0x48]
jne 0x477bab
lea ecx, [ebp - 0x60]
call fcn.00405cd3
lea ecx, [ebp - 0x34]
call fcn.00412570
pop edi
pop esi
pop ebx
leave
ret 0xc
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x60]
mov ecx, dword [ecx]
call fcn.00405b2a
mov ecx, dword [ebp - 8]
push 0x7f
pop edx
test al, al
je 0x405722
mov byte [0x4c22e4], 1
jmp 0x405722
test ecx, ecx
jne 0x40571c
jmp 0x405728
dec ecx
mov dword [ebp - 8], ecx
jmp 0x405722
inc ecx
jmp 0x4057b0
and dword [ebp - 0x18], 0
jmp 0x477917
push dword [ebp - 0x14]
push 0x7e
jmp 0x477bd7
push dword [ebp - 0x14]
push 0x6e
jmp 0x477bd7
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 1
cmp dword [edi + 8], eax
je 0x414190
push 0x10
call fcn.0042010a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4141e3
lea eax, [ebp - 0x1c]
push eax
mov ecx, ebx
mov dword [ebx + 8], 0
call fcn.004113a0
mov ecx, dword [edi + 8]
mov eax, dword [edi + 4]
push esi
mov dword [eax + ecx*4], ebx
inc dword [edi + 8]
mov ecx, dword [edi + 8]
mov eax, dword [edi + 4]
push dword [eax + ecx*4 - 4]
mov ecx, dword [ebp - 8]
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
call fcn.0040fa40
test eax, eax
js 0x4778ed
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
inc dword [ebx]
cmp ecx, esi
je 0x414177
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov eax, dword [eax + ecx*4]
cmp word [eax + 8], 0x40
jne 0x4778d8
lea eax, [ecx + 1]
cmp eax, esi
je 0x4778d8
lea ecx, [ebp - 0x1c]
mov dword [ebp + 0x14], eax
call fcn.00412570
cmp dword [ebp + 0x14], esi
jb 0x4140c1
jmp 0x41417f
lea ecx, [ebp - 0x1c]
call fcn.00412570
cmp byte [ebp + 8], 0
jne 0x4141ea
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
add eax, eax
cmp eax, 8
jae 0x41419c
mov eax, 8
xor ecx, ecx
mov dword [edi + 0xc], eax
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042010a
mov ebx, eax
mov eax, dword [edi + 4]
add esp, 4
test eax, eax
jne 0x4778af
mov dword [edi + 4], ebx
jmp 0x4140e2
xor ebx, ebx
jmp 0x414108
push ebx
push edi
call fcn.0045d21a
pop edi
pop esi
sub dword [eax + 0x5e5f0004], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14
call fcn.0044d548
or eax, 0xffffffff
jmp 0x4141af
push eax
push 0x6f
call fcn.0044d548
or eax, 0xffffffff
jmp 0x4141af
dec edi
or byte [eax], al
or al, 0xf
test byte [ebx], cl
leave
stc
inc ecx
loope 0x4778e7
push ecx
push eax
push ebx
call fcn.0041fac8
add esp, 0xc
push dword [edi + 4]
call fcn.004201a6
add esp, 4
jmp 0x4141ed
enter 0xfffffffffffffff9, 0xffffffffffffff8b
inc edx
add al, 0x8b
add al, 0x88
mov ecx, dword [ebp - 8]
movsx eax, word [eax + 0xa]
push eax
push 0x6f
call fcn.0044d548
lea ecx, [ebp - 0x1c]
call fcn.00412598
or eax, 0xffffffff
jmp 0x4141af
in al, 0xe8
jnp 0x4778c7
stc
inc dword [ebx - 0x75160038]
enter 0xfffffffffffffff9, 0xffffffffffffff83
cmp byte [edi + ecx], ch
test dword [esi - 0x380724], esi
jne 0x477941
mov ecx, ebx
push esi
push edi
call fcn.0045d46b
jmp 0xc840579b
mov ecx, dword [esi]
mov eax, dword [edi + 4]
push 0x4f
mov eax, dword [eax + ecx*4]
movsx ecx, word [eax + 0xa]
mov dword [ebp - 0xc], ecx
pop ecx
cmp word [eax + 8], cx
jne 0x477989
sub esp, 0x10
mov ecx, esp
push edi
call 0x8445d17c
adc byte [ebp + 0x75ff36ff], cl
call 0xfebab057
call 0x8c13c701
invalid
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
push eax
push esi
push edi
mov ecx, ebx
call fcn.0040fa68
mov dword [ebp + 0xf], eax
mov byte [ecx - 0x72ff95fe], cl
dec ebp
int3
push dword [ebp + eax*4 - 0x6000164]
mov ecx, dword [ebp - 0x10]
call 0x844034b1
xor byte [bx], cl
test cl, ah
add dword [eax], eax
add byte [ebx - 0xbf13bb], cl
pop ds
mov eax, dword [ebp - 0x14]
inc eax
call [edi]
in al, dx
cmp eax, dword [ebp - 0x18]
jl 0x477a13
adc byte [eax], al
push dword [ebp - 0x10]
call fcn.00403348
pop ecx
pop ecx
xor byte [bx], cl
test dword [eax - 0x24], esp
clc
invalid
stc
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
push 1
lea eax, [ebp - 0x6000164]
push eax
push dword [ebp - 0x10]
mov ecx, ebx
push esi
push edi
call 0x84402062
xor byte [bx], cl
test ch, al
invalid
jne 0x477c41
lea eax, [edx + 1]
mov dword [esi], eax
mov eax, dword [ecx + eax*4]
push 0x33
pop edx
cmp word [eax + 8], dx
je 0x405630
push 0x7f
pop edx
mov ecx, dword [esi]
mov eax, dword [edi + 4]
mov eax, dword [eax + ecx*4]
movsx eax, word [eax + 0xa]
push eax
push edx
mov ecx, ebx
push 0x7b
jmp 0x477bff
or dl, byte [eax + 0x68]
mov cl, 0x27
add bl, ch
mov esi, 0x8b04478b
retf 0x48b
mov eax, dword [edi + 4]
mov ecx, edx
mov eax, dword [eax + ecx*4]
movsx eax, word [eax + 0xa]
push eax
push 0x7f
pop eax
push eax
jmp 0x477bff