Function at 0x402810
Capabilities:
Encode data using xor
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4124d0
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x423568]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0xb4], ebx
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x34], 0
push dword [eax - 8]
call fcn.00401e70
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
lea ecx, [ecx*2 + 2]
push ecx
push eax
push dword [ebx]
call fcn.00407900
add esp, 0xc
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
push 1
push 0xa
call fcn.0040961a
add eax, 8
push 1
push 0xa
mov dword [ebp - 0x84], eax
call fcn.0040961a
add eax, 8
push 1
push 0xa
mov dword [ebp - 0x80], eax
call fcn.0040961a
add eax, 8
mov dword [ebp - 0x3c], eax
push 1
push 0xa
call fcn.0040961a
lea edi, [eax + 8]
mov dword [ebp - 0x2c], edi
push 1
push 0xa
call fcn.0040961a
add esp, 0x28
lea esi, [eax + 8]
mov dword [ebp - 0x30], esi
push 0x40
mov byte [ebp - 4], 3
lea ecx, [ebx + 4]
push dword [ebp + 8]
call fcn.00401940
test eax, eax
je 0x402de5
lea eax, [ebp - 0x18]
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x18]
xor edx, edx
add edx, eax
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb0], edx
adc ecx, 0
mov dword [ebp - 0xac], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xa8], ecx
test ecx, ecx
jg 0x4029b8
jl 0x402944
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xa4], eax
test eax, eax
jae 0x4029c1
push 2
push 0xffffffffffffffff
push 0xfffffffffffffff0
lea ecx, [ebx + 4]
call fcn.00401b80
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 8
lea eax, [ebp - 0x24]
xorps xmm0, xmm0
push eax
push dword [ebx + 8]
movlpd qword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
not dword [ebp - 0x24]
lea eax, [ebp - 0x18]
not dword [ebp - 0x20]
push 0
push eax
push 8
lea eax, [ebp + 0xc]
mov dword [ebp - 0x18], 0
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
xor eax, dword [ebp - 0x24]
xor ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xb0]
mov dword [ebp + 0xc], eax
mov dword [ebp - 0xa8], ecx
mov dword [ebp + 0x10], ecx
jmp 0x4029bb
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xa4], eax
add edx, 0xffffffe8
mov dword [ebp - 0xb0], edx
adc dword [ebp - 0xac], 0xffffffff
cmp ecx, dword [ebp - 0xac]
ja 0x402dc9
jb 0x4029e7
cmp eax, edx
jae 0x402dc9
push 0
push ecx
push eax
lea ecx, [ebx + 4]
call fcn.00401b80
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0xa8]
push 0
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x18], 0
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x34]
mov eax, ecx
mov dword [ebp - 0xa0], ecx
shr eax, 0x18
shr ecx, 0x10
xor al, cl
mov cl, byte [ebp - 0xa0]
mov byte [ebp - 0x9d], al
mov al, byte [ebp - 0x9f]
xor byte [ebp - 0x9e], al
xor al, cl
not cl
mov byte [ebp - 0x9f], al
mov byte [ebp - 0xa0], cl
mov esi, dword [ebp - 0xa0]
add esi, 0xfffcea1c
push 1
push esi
mov dword [ebp - 0x28], esi
call fcn.0040961a
push 1
push esi
mov dword [ebp - 0xa0], eax
call fcn.0040961a
add esp, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 0
test esi, esi
je 0x402aa6
push 0
lea ecx, [ebp - 0x20]
push ecx
push esi
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xa0]
push esi
push eax
push ecx
call fcn.00407900
mov ecx, dword [ebp - 0x28]
add esp, 0xc
xor esi, esi
xor edx, edx
test ecx, ecx
je 0x402af7
mov edi, dword [ebp - 0xa0]
mov ebx, ecx
nop word [eax + eax]
mov al, byte [esi + 0x419dc4]
xor ecx, ecx
xor byte [edx + edi], al
inc edx
cmp esi, 0x17
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, ebx
jb 0x402ad0
mov edi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0xb4]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0xa0]
xor eax, eax
add ecx, dword [ebp - 0xa4]
adc eax, dword [ebp - 0xa8]
add ecx, 4
mov dword [ebp - 0x6c], ecx
mov ecx, dword [edx + 4]
adc eax, 0
mov dword [ebp - 0x68], eax
mov eax, dword [edx]
mov dword [ebp - 0x9c], eax
mov eax, dword [edx + 8]
mov dword [ebp - 0x94], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x8c], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x98], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x88], eax
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x90], ecx
mov ecx, dword [edx + 0x38]
mov dword [ebp - 0x64], eax
mov eax, dword [edx + 0x3c]
mov dword [ebp - 0x60], ecx
mov ecx, dword [edx + 0x40]
mov dword [ebp - 0x5c], eax
lea eax, [edx + 0x44]
mov dword [ebp - 0x58], ecx
mov ecx, eax
mov dword [ebp - 0x20], eax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402b70
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x84]
call fcn.00401e70
mov esi, dword [ebp - 0x84]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push dword [ebp - 0x20]
push esi
call fcn.00407900
mov ecx, dword [ebp - 0xa0]
add esp, 0xc
mov eax, dword [esi - 8]
add ecx, 0x46
lea eax, [ecx + eax*2]
mov ecx, eax
mov dword [ebp - 0x20], eax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402bc0
sub ecx, edx
sar ecx, 1
push ecx
lea ecx, [ebp - 0x80]
call fcn.00401e70
mov esi, dword [ebp - 0x80]
mov eax, dword [esi - 8]
lea eax, [eax*2 + 2]
push eax
push dword [ebp - 0x20]
push esi
call fcn.00407900
mov eax, dword [ebp - 0x94]
add esp, 0xc
add dword [ebx + 0x30], eax
mov eax, dword [ebp - 0x90]
adc dword [ebx + 0x34], eax
mov eax, dword [ebp - 0x9c]
add eax, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x98]
adc edx, dword [ebp - 0x68]
mov dword [ebp - 0xa4], eax
sub eax, dword [ebp - 0x7c]
mov dword [ebp - 0xa8], edx
sbb edx, dword [ebp - 0x78]
push 1
push 0xa
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], edx
call fcn.0040961a
mov ebx, dword [ebp - 0x84]
lea ecx, [ebp - 0x28]
add eax, 8
add esp, 8
mov dword [ebp - 0x28], eax
mov eax, dword [ebx - 8]
add eax, dword [esi - 8]
push eax
call fcn.00401e70
mov eax, dword [esi - 8]
add eax, eax
push eax
push esi
mov esi, dword [ebp - 0x28]
push esi
call fcn.00407900
mov ecx, dword [ebp - 0x80]
add esp, 0xc
mov eax, dword [ebx - 8]
add eax, eax
mov ecx, dword [ecx - 8]
push eax
push ebx
lea eax, [esi + ecx*2]
push eax
call fcn.00407900
add esp, 0xc
mov byte [ebp - 4], 4
xor ecx, ecx
mov ebx, dword [esi - 8]
test ebx, ebx
jle 0x402cac
nop
movzx edx, word [esi + ecx*2]
lea eax, [edx - 0x61]
cmp ax, 0x19
ja 0x402ca4
lea eax, [edx - 0x20]
mov word [esi + ecx*2], ax
mov ebx, dword [esi - 8]
inc ecx
cmp ecx, ebx
jl 0x402c90
or edx, 0xffffffff
mov dword [ebp - 0x20], esi
or eax, 0xffffffff
add ebx, ebx
je 0x402ce8
mov edi, esi
nop dword [eax + eax]
movzx ecx, byte [edi]
lea edi, [edi + 1]
xor ecx, edx
shrd edx, eax, 8
movzx ecx, cl
shr eax, 8
xor edx, dword [ecx*8 + 0x4195c0]
xor eax, dword [ecx*8 + 0x4195c4]
sub ebx, 1
jne 0x402cc0
mov edi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0xb4]
mov dword [ebp - 0xbc], edx
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebx + 0x60]
cmp ecx, dword [ebx + 0x64]
je 0x402d0d
mov dword [ecx], edx
mov dword [ecx + 4], eax
add dword [ebx + 0x60], 8
jmp 0x402d1d
lea eax, [ebp - 0xbc]
push eax
push ecx
lea ecx, [ebx + 0x5c]
call fcn.00405200
mov eax, dword [ebx + 0x24]
lea ecx, [ebp - 0x9c]
push ecx
cmp eax, dword [ebx + 0x28]
je 0x402d39
mov ecx, eax
call fcn.004056d0
add dword [ebx + 0x24], 0x68
jmp 0x402d42
push eax
lea ecx, [ebx + 0x20]
call fcn.00405360
add dword [ebx + 0x10], 1
push dword [ebp - 0xa0]
adc dword [ebx + 0x14], 0
call fcn.00409bd0
add esp, 4
push dword [ebp - 0x18]
call fcn.00409bd0
mov edx, dword [ebp + 0x14]
add esp, 4
mov ecx, dword [ebp + 0x18]
mov eax, edx
or eax, ecx
je 0x402d7b
cmp dword [ebx + 0x14], ecx
ja 0x402db6
jb 0x402d7b
cmp dword [ebx + 0x10], edx
jae 0x402db6
mov byte [ebp - 4], 3
test esi, esi
je 0x402d8f
lea eax, [esi - 8]
push eax
call fcn.00409bd0
add esp, 4
mov ecx, dword [ebp - 0xa8]
cmp ecx, dword [ebp - 0xac]
ja 0x402dc6
mov eax, dword [ebp - 0xa4]
jb 0x4029e7
cmp eax, dword [ebp - 0xb0]
jae 0x402dc6
jmp 0x4029e7
test esi, esi
je 0x402dc6
lea eax, [esi - 8]
push eax
call fcn.00409bd0
add esp, 4
mov esi, dword [ebp - 0x30]
mov eax, dword [ebx + 8]
test eax, eax
je 0x402dde
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 8], 0
mov ebx, 1
jmp 0x402de7
xor ebx, ebx
test esi, esi
je 0x402df7
add esi, 0xfffffff8
push esi
call fcn.00409bd0
add esp, 4
test edi, edi
je 0x402e07
add edi, 0xfffffff8
push edi
call fcn.00409bd0
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x402e1a
add eax, 0xfffffff8
push eax
call fcn.00409bd0
add esp, 4
mov eax, dword [ebp - 0x80]
test eax, eax
je 0x402e2d
add eax, 0xfffffff8
push eax
call fcn.00409bd0
add esp, 4
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x402e43
add eax, 0xfffffff8
push eax
call fcn.00409bd0
add esp, 4
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x402e56
add ecx, 0xfffffff8
push ecx
call fcn.00409bd0
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004065da
mov esp, ebp
pop ebp
ret 0x14