Function at 0x10022a87
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0x1c]
push ebx
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
push 0x7c
pop edi
xor ebx, ebx
cmp word [eax + 2], bx
push edi
push dword [ebp + 0x10]
setne al
mov byte [ebp - 0x2c], al
call esi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x10022aed
push dword [ebp + 0x10]
lea ecx, [ebp - 0x18]
call fcn.100501eb
lea eax, [ebp - 0x18]
push eax
call fcn.1004da1f
test al, al
pop ecx
jle 0x10022ae2
push 0x2b
pop edi
push edi
push dword [ebp + 0x10]
call esi
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x18]
call fcn.1003f96c
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x3c], 0xffffffff
or dword [ebp - 0x38], 0xffffffff
cmp eax, ebx
mov esi, eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
je 0x10022b52
mov word [eax], bx
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.1004bbf7
mov eax, dword [ebp - 0x24]
cdq
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xc]
pop ecx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
cmp di, word [eax]
pop ecx
mov dword [ebp - 0x30], edx
jne 0x10022b48
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.1004bbf7
pop ecx
pop ecx
mov eax, dword [ebp - 0x24]
cdq
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
push dword [ebp + 0x10]
lea ecx, [ebp - 0x10]
call fcn.100501eb
cmp esi, ebx
je 0x10022b66
mov word [esi], 0x2b
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x28], ebx
call fcn.1004d921
mov byte [ebp - 0x18], al
mov eax, dword [ebp + 0x1c]
pop ecx
pop ecx
mov ecx, dword [ebp + 0x18]
sar eax, 0x10
mov dword [ebp - 0x14], eax
push ebx
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
call fcn.10002f54
cmp byte [ebp - 0x18], 0
mov dword [ebp - 8], ebx
mov esi, 0x80000000
je 0x10022bca
push dword [ebp - 0x10]
call fcn.10004e63
test eax, eax
pop ecx
je 0x10022bca
push 7
push esi
push dword [ebp - 0x10]
call fcn.10014572
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x10022be6
push ebx
push ebx
push 3
push ebx
push 7
push esi
push dword [ebp - 0x10]
lea ecx, [ebp - 8]
call fcn.10005b9d
cmp dword [ebp - 8], ebx
je 0x10022f1a
cmp byte [ebp - 0x18], 0
je 0x10022bfa
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.10044651
pop ecx
jmp 0x10022c02
push dword [ebp - 8]
call fcn.1000ffaa
cmp edx, ebx
pop ecx
mov esi, eax
jl 0x10022f1a
jg 0x10022c17
cmp esi, ebx
jbe 0x10022f1a
cmp edx, dword [ebp - 0x30]
jl 0x10022f1a
jg 0x10022c2b
cmp esi, dword [ebp - 0x34]
jb 0x10022f1a
cmp dword [ebp - 0x30], ebx
jl 0x10022c3d
jg 0x10022c37
cmp dword [ebp - 0x34], ebx
jbe 0x10022c3d
sub esi, dword [ebp - 0x34]
sbb edx, dword [ebp - 0x30]
cmp edx, ebx
jl 0x10022c50
mov eax, 0x10000000
jg 0x10022c4c
cmp esi, eax
jbe 0x10022c50
mov esi, eax
xor edx, edx
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jl 0x10022c6f
jg 0x10022c5e
cmp dword [ebp - 0x3c], ebx
jbe 0x10022c6f
cmp edx, eax
jl 0x10022c6f
jg 0x10022c69
cmp esi, dword [ebp - 0x3c]
jbe 0x10022c6f
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
lea edi, [esi + 0x10]
push edi
lea ecx, [ebp - 0x4c]
call fcn.10045ff1
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x10022c95
lea ecx, [ebp - 8]
call fcn.10002d56
mov esi, dword [ebp + 0x1c]
jmp 0x10022f25
cmp dword [ebp - 0x30], ebx
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], edi
jl 0x10022cb8
jg 0x10022ca7
cmp dword [ebp - 0x34], ebx
jbe 0x10022cb8
push ebx
push ebx
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x20]
mov dword [ebp - 0x18], ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x18]
cmp esi, ebx
jge 0x10022cd6
xor esi, esi
mov eax, dword [ebp - 0x20]
push 0x10
add eax, esi
push ebx
push eax
call fcn.100b40f0
add esp, 0xc
lea ecx, [ebp - 8]
call fcn.10002d56
push dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
call fcn.1004618f
mov ecx, dword [ebp + 0x14]
push 0x100ca648
call fcn.1004618f
push ebx
push esi
push dword [ebp - 0x4c]
call fcn.10042f62
mov byte [ebp - 1], al
movzx eax, word [ebp - 0x14]
mov ecx, eax
and ecx, 0xff
mov edi, ecx
shl edi, 8
or edi, ecx
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x10022d8a
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], esi
call fcn.1004a457
push dword [ebp - 0x40]
call fcn.1003f93e
mov ecx, dword [ebp + 0x1c]
movsx eax, byte [ebp - 1]
mov esi, edi
shl esi, 0x10
and ecx, 0xffff
or esi, ecx
or esi, eax
or eax, dword [ebp + 0x1c]
add esp, 0x10
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x1c], eax
call fcn.1003f96c
jmp 0x10022dbd
mov dx, word [ecx]
cmp dx, 0xfeff
je 0x10022d9b
cmp dx, 0xfffe
jne 0x10022d9d
mov edi, eax
inc esi
shr esi, 1
dec esi
js 0x10022dae
lea eax, [esi + 1]
xor word [ecx], di
inc ecx
inc ecx
dec eax
jne 0x10022da6
mov eax, dword [ebp + 0x1c]
mov esi, edi
shl esi, 0x10
and eax, 0xffff
or esi, eax
or esi, 3
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.100a3193
push edi
push dword [ebp - 0x4c]
call fcn.10012c4c
mov ebx, eax
movzx eax, word [ebp - 0x14]
add esp, 0x10
cmp edi, eax
je 0x10022df6
xor edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x4c]
lea eax, [ebx - 1]
test eax, eax
jl 0x10022df6
inc eax
xor word [ecx], di
inc ecx
inc ecx
dec eax
jne 0x10022dee
mov edi, dword [ebp + 0x18]
mov ax, word [edi + 0x4c]
mov word [ebp - 0x20], ax
lea eax, [ebx + ebx + 0x22]
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
call fcn.1000f742
mov eax, dword [ebp - 0x4c]
lea eax, [eax + ebx*2]
and word [eax + 0x20], 0
push 0xf
pop ecx
mov dx, word [ebp - 0x14]
mov word [eax + ecx*2], dx
dec ecx
jns 0x10022e22
mov eax, dword [ebp - 0x4c]
push dword [ebp - 0x2c]
mov esi, edi
mov dword [ebp - 0x18], eax
call fcn.1001a3d1
mov eax, dword [ebp - 0x20]
pop ecx
mov ecx, dword [ebp - 0x18]
cmp word [ecx], ax
jne 0x10022e50
xor esi, esi
jmp 0x10022f25
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x10022e66
push eax
push ecx
call fcn.10012c4c
pop ecx
pop ecx
mov esi, eax
jmp 0x10022e68
xor esi, esi
mov eax, dword [ebp - 0x18]
mov ax, word [eax + ebx*2 - 2]
and dword [ebp + 0x1c], 0
cmp ax, word [edi + 0x54]
je 0x10022e81
mov dword [ebp + 0x1c], 1
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
lea edi, [eax + ebx]
add edi, esi
lea eax, [edi + 0x10]
push eax
call fcn.1000f775
cmp dword [ebp + 0xc], esi
jle 0x10022e9d
mov dword [ebp + 0xc], esi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp esi, ecx
mov eax, dword [eax]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x2c], eax
jle 0x10022ec9
sub esi, ecx
mov ecx, dword [ebp + 0x1c]
shl esi, 1
push esi
push eax
add ecx, ebx
lea eax, [eax + ecx*2]
push eax
call fcn.100144b5
mov eax, dword [ebp - 0x2c]
add esp, 0xc
cmp dword [ebp + 0x1c], 0
je 0x10022eda
mov ecx, dword [ebp + 0x18]
mov cx, word [ecx + 0x54]
mov word [eax + ebx*2], cx
lea ecx, [ebx + ebx]
push ecx
push dword [ebp - 0x18]
push eax
call fcn.100144ff
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov cx, word [ebp - 0x20]
mov word [eax + edi*2], cx
push dword [ebp - 0x4c]
call fcn.1003f93e
push dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1c]
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0xc]
push esi
call fcn.100227f9
movzx esi, ax
add esp, 0x24
or esi, dword [ebp - 0x1c]
jmp 0x10022f25
lea ecx, [ebp - 8]
call fcn.10002d56
or esi, 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.1003f96c
lea ecx, [ebp - 0x10]
call fcn.1003f96c
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret