Function at 0x402370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc8
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov si, 0x597f
mov word [esp + 0xb2], 0xd6a
mov dword [esp + 0xac], 0x7680
mov byte [esp + 0xab], 0x9c
mov dword [esp + 0x68], 0x6967
mov word [esp + 0x9e], 0x56f
mov bl, byte [esp + 0xab]
mov bh, bl
add bh, 0xca
mov di, word [esp + 0x9e]
mov byte [esp + 0x66], bh
mov dword [esp + 0x44], 0x4708
mov word [esp + 0x36], si
mov si, word [esp + 0xb2]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x44]
mov byte [esp + 0xb5], 0x18
mov word [esp + 0x2e], si
mov si, word [esp + 0x36]
mov word [esp + 0x2c], di
mov di, word [esp + 0x2e]
sub si, di
mov di, word [esp + 0x2c]
cmp si, di
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov byte [esp + 0x1f], bl
jbe 0x4025ac
mov byte [esp + 0x5b], 0x16
mov eax, dword [esp + 0x28]
cmp eax, 0x262f
jbe 0x4025f2
mov al, byte [esp + 0xab]
xor al, 0x8e
cmp al, byte [esp + 0x5b]
ja 0x402582
mov eax, 0x7680
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xa0], ecx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x40], edx
mov esi, dword [esp + 0x20]
mov dword [esp + 0xa4], esi
mov dword [esp + 0x3c], 0
sub eax, dword [esp + 0xac]
mov edi, dword [0x401088]
mov dword [esp + 0x91], edi
mov edi, dword [0x40108c]
mov dword [esp + 0x95], edi
mov edi, dword [0x401090]
mov dword [esp + 0x99], edi
mov bl, byte [0x401094]
mov byte [esp + 0x9d], bl
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xac]
xor ecx, 0x195b
add eax, 0xffffb1ee
mov dl, byte [esp + 0x66]
mov byte [esp + 0x67], dl
mov dword [esp + 0x54], eax
cmp dword [esp + 0x54], ecx
je 0x4024be
mov eax, dword [esp + 0x38]
mov dword [esp + 0x50], eax
mov cl, byte [esp + 0x67]
mov dl, byte [esp + 0xab]
xor dl, 0x42
cmp dl, cl
jb 0x40265e
mov eax, dword [esp + 0xa0]
cmp dword [esp + 0x50], eax
jae 0x4025ac
mov eax, dword [esp + 0xac]
mov ecx, 0x768c
sub ecx, eax
mov word [esp + 0xb6], 0x1a62
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x38]
mov dword [esp + 0xbc], 0
mov dword [esp + 0xb8], 0x14a3
mov esi, dword [esp + 0x38]
mov dword [esp + 0x18], eax
mov eax, esi
xor esi, esi
mov dword [esp + 0x14], edx
mov edx, esi
div ecx
movsx ecx, byte [esp + edx + 0x91]
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
movsx ebx, byte [esi + edi]
sub ebx, ecx
mov cl, bl
mov byte [esp + edx + 0x6c], cl
mov eax, 0x7681
mov ecx, dword [esp + 0x38]
sub eax, dword [esp + 0xac]
add ecx, eax
mov dl, 3
mov al, byte [esp + 0x1f]
mul dl
mov byte [esp + 0xb5], al
mov dword [esp + 0x38], ecx
jmp 0x4024be
mov eax, 0xab67
mov ecx, dword [esp + 0x68]
sub eax, dword [esp + 0xac]
cmp eax, ecx
ja 0x4025f2
mov ax, 0x13c5
mov cl, byte [esp + 0xab]
xor cl, 0x9c
sub ax, word [esp + 0xb2]
mov edx, dword [esp + 0xa0]
mov word [esp + 0x4e], 0x5c8d
mov si, word [esp + 0x4e]
mov byte [esp + edx + 0x6c], cl
cmp si, ax
jbe 0x40265e
lea eax, [esp + 0x6c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x60]
mov dword [esp], eax
call fcn.00405d90
mov cx, ax
mov word [esp + 0x5c], cx
mov word [esp + 0x5e], cx
call fcn.00407830
mov edx, dword [esp + 0xac]
xor edx, 0x7680
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa4]
mov esi, dword [esp + 0x48]
mov edi, esp
lea ebx, [esp + 0x3c]
mov dword [edi + 0xc], ebx
lea ebx, [esp + 0x5c]
mov dword [edi + 4], ebx
mov dword [edi], eax
mov dword [edi + 8], 0
mov dword [esp + 0x10], edx
call esi
sub esp, 0x10
mov edx, dword [esp + 0x10]
cmp eax, edx
je 0x40266b
mov dword [esp + 0x8c], 0
jmp 0x402676
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x8c]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret