Function at 0x45a164
Capabilities:
Encode data using xor
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
call fcn.004089a0
mov eax, dword [ebp - 8]
call fcn.004089a0
xor eax, eax
push ebp
push 0x45a4b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebx + 0x10]
mov eax, ecx
mov edi, dword [ebx + 0x1c]
cdq
idiv edi
mov dword [ebp - 0x1c], edx
mov eax, ecx
cdq
idiv edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x45a280
cmp dword [ebx + 8], 1
jne 0x45a280
cmp dword [ebx + 0x24], 0
jne 0x45a280
mov eax, dword [ebp - 0x14]
shl eax, 0x20
cdq
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x1c]
cdq
idiv ecx
cdq
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov eax, dword [ebp + 0x10]
dec eax
sub eax, dword [ebp - 0x14]
imul ecx
cdq
idiv dword [ebx + 0x10]
cmp eax, esi
jle 0x45a211
mov eax, esi
mov esi, eax
dec esi
test esi, esi
jl 0x45a253
inc esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x2c]
xor edx, edx
mov edx, dword [ebp - 8]
movzx eax, word [edx + eax*2]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, dword [ebp - 0x38]
adc edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
inc dword [ebp - 0x10]
dec dword [ebp - 0x50]
jne 0x45a223
mov eax, dword [ebp - 0x10]
imul dword [ebp - 0x1c]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
imul dword [ebp - 0x20]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
cdq
idiv dword [ebx + 0x1c]
add dword [ebp - 0x14], eax
mov ecx, dword [ebx + 0x1c]
mov eax, dword [ebp - 0x18]
cdq
idiv ecx
mov dword [ebp - 0x18], edx
jmp 0x45a42e
dec esi
test esi, esi
jl 0x45a42e
inc esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x10], 0
mov esi, dword [ebx + 8]
mov eax, esi
mov edx, dword [ebx + 0x28]
and edx, dword [ebp - 0x14]
imul edx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
cdq
mov ecx, dword [ebx + 0x24]
call fcn.00408480
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x40], 0
jge 0x45a301
mov edi, esi
dec edi
test edi, edi
jl 0x45a3cb
inc edi
xor esi, esi
mov eax, dword [ebp - 0x40]
add eax, esi
cdq
xor eax, edx
sub eax, edx
cdq
idiv dword [ebp + 0x10]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x4c]
movsx eax, word [eax + edx*2]
mov edx, dword [ebp - 0x3c]
add edx, esi
mov ecx, dword [ebx + 4]
movsx edx, word [ecx + edx*2]
imul edx
add dword [ebp - 0x44], eax
inc esi
dec edi
jne 0x45a2cc
jmp 0x45a3cb
mov eax, esi
add eax, dword [ebp - 0x40]
cmp eax, dword [ebp + 0x10]
jg 0x45a42e
cmp dword [ebx + 0x2c], 1
jne 0x45a379
xor eax, eax
mov dword [ebp - 0x48], eax
mov edi, esi
dec edi
test edi, edi
jl 0x45a365
inc edi
xor esi, esi
mov eax, dword [ebp - 0x40]
add eax, esi
mov edx, dword [ebp - 8]
movsx eax, word [edx + eax*2]
mov edx, dword [ebp - 0x3c]
add edx, esi
mov ecx, dword [ebx + 4]
movsx edx, word [ecx + edx*2]
imul edx
add dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
add eax, esi
mov edx, dword [ebp - 8]
movsx eax, word [edx + eax*2]
mov edx, dword [ebp - 0x3c]
add edx, esi
add edx, dword [ebx + 8]
mov ecx, dword [ebx + 4]
movsx edx, word [ecx + edx*2]
imul edx
add dword [ebp - 0x48], eax
inc esi
dec edi
jne 0x45a324
mov eax, dword [ebp - 0x18]
cdq
idiv dword [ebx + 0x1c]
mov edx, dword [ebp - 0x48]
sub edx, dword [ebp - 0x44]
imul edx
add dword [ebp - 0x44], eax
jmp 0x45a3cb
mov edi, esi
dec edi
test edi, edi
jl 0x45a3cb
inc edi
xor esi, esi
mov eax, dword [ebp - 0x40]
add eax, esi
mov edx, dword [ebp - 8]
movsx eax, word [edx + eax*2]
mov edx, dword [ebp - 0x3c]
add edx, esi
mov ecx, dword [ebx + 4]
movsx edx, word [ecx + edx*2]
imul edx
add dword [ebp - 0x44], eax
cmp dword [ebp - 0x10], 0x47c
jne 0x45a3c7
cmp esi, 0x1d
jne 0x45a3c7
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 0x44]
call fcn.00415984
mov eax, dword [ebp - 0x54]
call fcn.004076e4
push eax
call sub.kernel32.dll_OutputDebugStringW
inc esi
dec edi
jne 0x45a383
mov eax, dword [ebp - 0x44]
add eax, 0x4000
shr eax, 0xf
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
movzx ecx, word [ebp - 0x44]
mov word [eax + edx*2], cx
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x14], eax
mov ecx, dword [ebx + 0x1c]
cmp ecx, dword [ebp - 0x18]
jg 0x45a401
sub dword [ebp - 0x18], ecx
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
inc eax
cmp eax, dword [ebp - 0x24]
jne 0x45a422
xor eax, eax
mov dword [ebp - 0x24], eax
mov esi, dword [ebx + 0xc]
mov eax, esi
cdq
idiv ecx
mov dword [ebp - 0x1c], edx
mov eax, esi
cdq
idiv ecx
mov dword [ebp - 0x20], eax
inc dword [ebp - 0x10]
dec dword [ebp - 0x50]
jne 0x45a294
cmp dword [ebp - 0x14], 0
jle 0x45a439
mov eax, dword [ebp - 0x14]
jmp 0x45a43b
xor eax, eax
mov ecx, dword [ebx + 0x24]
shr eax, cl
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
cmp dword [ebp - 0x14], 0
jl 0x45a451
mov eax, dword [ebx + 0x28]
and dword [ebp - 0x14], eax
cmp dword [ebp - 0x24], 0
je 0x45a45d
mov eax, dword [ebp - 0x10]
sub dword [ebp - 0x24], eax
cmp dword [ebp + 8], 1
jne 0x45a481
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x14], eax
mov eax, dword [ebx + 0x1c]
imul dword [ebp - 0x20]
add eax, dword [ebp - 0x1c]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45a4b7
lea eax, [ebp - 0x54]
call fcn.00406928
lea eax, [ebp - 8]
mov edx, dword [0x4599a0]
mov ecx, 2
call fcn.00408018
ret