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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 0x1c]
push ebx
push esi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_StrChrW]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
push 0x7c
pop esi
xor ebx, ebx
cmp word [eax + 2], bx
push esi
push dword [ebp + 0x10]
setne al
mov byte [ebp - 0x30], al
call edi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x422135
push dword [ebp + 0x10]
lea ecx, [ebp - 0x18]
call fcn.004419bc
lea eax, [ebp - 0x18]
push eax
call fcn.0043e3cb
test al, al
pop ecx
jle 0x42212a
push 0x2b
pop esi
push esi
push dword [ebp + 0x10]
call edi
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0x18]
call fcn.00431c4c
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x38], 0xffffffff
or dword [ebp - 0x34], 0xffffffff
cmp eax, ebx
mov edi, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
je 0x42219a
mov word [eax], bx
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call fcn.0043bfa0
mov eax, dword [ebp - 0x1c]
cdq
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
pop ecx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
cmp si, word [eax]
pop ecx
mov dword [ebp - 0x24], edx
jne 0x422190
add dword [ebp - 0xc], 2
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.0043bfa0
pop ecx
pop ecx
mov eax, dword [ebp - 0x1c]
cdq
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
push dword [ebp + 0x10]
lea ecx, [ebp - 0x14]
call fcn.004419bc
cmp edi, ebx
je 0x4221ae
mov word [edi], 0x2b
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x2c], ebx
call fcn.0043e28e
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 - 0x10], eax
push ebx
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
call fcn.00402c95
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
push dword [ebp - 0x14]
lea ecx, [ebp - 8]
mov dword [ebp - 8], ebx
call fcn.00404863
cmp dword [ebp - 8], ebx
je 0x42254a
cmp byte [ebp - 0x18], 0
je 0x422219
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.00435d7d
pop ecx
jmp 0x422221
push dword [ebp - 8]
call fcn.0040c689
cmp edx, ebx
pop ecx
mov edi, eax
jl 0x42254a
jg 0x422236
cmp edi, ebx
jbe 0x42254a
cmp edx, dword [ebp - 0x24]
jl 0x42254a
jg 0x42224a
cmp edi, dword [ebp - 0x28]
jb 0x42254a
cmp dword [ebp - 0x24], ebx
jl 0x42225c
jg 0x422256
cmp dword [ebp - 0x28], ebx
jbe 0x42225c
sub edi, dword [ebp - 0x28]
sbb edx, dword [ebp - 0x24]
cmp edx, ebx
jl 0x42226f
mov eax, 0x10000000
jg 0x42226b
cmp edi, eax
jbe 0x42226f
mov edi, eax
xor edx, edx
mov eax, dword [ebp - 0x34]
cmp eax, ebx
jl 0x42228e
jg 0x42227d
cmp dword [ebp - 0x38], ebx
jbe 0x42228e
cmp edx, eax
jl 0x42228e
jg 0x422288
cmp edi, dword [ebp - 0x38]
jbe 0x42228e
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
lea esi, [edi + 0x10]
push esi
lea ecx, [ebp - 0x48]
call fcn.00437099
mov eax, dword [ebp - 0x48]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x4222b4
lea ecx, [ebp - 8]
call fcn.00402b75
mov esi, dword [ebp + 0x1c]
jmp 0x422555
cmp dword [ebp - 0x24], ebx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], esi
jl 0x4222d7
jg 0x4222c6
cmp dword [ebp - 0x28], ebx
jbe 0x4222d7
push ebx
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
lea eax, [ebp - 0x24]
push eax
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x24], ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x24]
cmp edi, ebx
jge 0x4222f5
xor edi, edi
mov eax, dword [ebp - 0x18]
push 0x10
add eax, edi
push ebx
push eax
call fcn.004832e0
add esp, 0xc
lea ecx, [ebp - 8]
call fcn.00402b75
push dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
call fcn.004371ec
mov ecx, dword [ebp + 0x14]
push 0x49aa70
call fcn.004371ec
push ebx
push edi
push dword [ebp - 0x48]
call fcn.00434929
mov byte [ebp - 1], al
movzx eax, word [ebp - 0x10]
mov ecx, eax
and ecx, 0xff
mov esi, ecx
shl esi, 8
or esi, ecx
mov ecx, dword [ebp - 0x48]
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x4223bd
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], edi
call fcn.0043ad84
push dword [ebp - 0x3c]
call fcn.00431c1e
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
xor eax, 0xfeff
add esp, 0x10
cmp ax, word [ecx]
jne 0x422397
movzx esi, word [ebp - 0x10]
mov ecx, dword [ebp + 0x1c]
movsx eax, byte [ebp - 1]
mov edi, esi
shl edi, 0x10
and ecx, 0xffff
or edi, ecx
or edi, eax
or eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x20], eax
call fcn.00431c4c
jmp 0x4223ed
mov edx, dword [ebp - 0x10]
xor edx, 0xfeff
cmp dx, word [ecx]
jne 0x4223cd
mov esi, eax
inc edi
shr edi, 1
dec edi
js 0x4223de
lea eax, [edi + 1]
xor word [ecx], si
inc ecx
inc ecx
dec eax
jne 0x4223d6
mov eax, dword [ebp + 0x1c]
mov edi, esi
shl edi, 0x10
and eax, 0xffff
or edi, eax
or edi, 3
lea eax, [ebp - 0x48]
push edi
push eax
call fcn.0047a39a
push esi
push dword [ebp - 0x48]
call fcn.0040f222
mov ebx, eax
movzx eax, word [ebp - 0x10]
add esp, 0x10
cmp esi, eax
je 0x422426
xor esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x48]
lea eax, [ebx - 1]
test eax, eax
jl 0x422426
inc eax
xor word [ecx], si
inc ecx
inc ecx
dec eax
jne 0x42241e
mov esi, dword [ebp + 0x18]
mov ax, word [esi + 0x4c]
mov word [ebp - 0x24], ax
lea eax, [ebx + ebx + 0x22]
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
call fcn.0040bf72
mov eax, dword [ebp - 0x48]
lea eax, [eax + ebx*2]
and word [eax + 0x20], 0
push 0xf
pop ecx
mov dx, word [ebp - 0x10]
mov word [eax + ecx*2], dx
dec ecx
jns 0x422452
mov eax, dword [ebp - 0x48]
push dword [ebp - 0x30]
mov edi, esi
mov dword [ebp - 0x18], eax
call fcn.00417315
mov eax, dword [ebp - 0x24]
pop ecx
mov ecx, dword [ebp - 0x18]
cmp word [ecx], ax
jne 0x422480
xor esi, esi
jmp 0x422555
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x422496
push eax
push ecx
call fcn.0040f222
pop ecx
pop ecx
mov edi, eax
jmp 0x422498
xor edi, edi
mov eax, dword [ebp - 0x18]
mov ax, word [eax + ebx*2 - 2]
and dword [ebp + 0x1c], 0
cmp ax, word [esi + 0x54]
je 0x4224b1
mov dword [ebp + 0x1c], 1
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
lea esi, [eax + ebx]
add esi, edi
lea eax, [esi + 0x10]
push eax
call fcn.0040bfa3
cmp dword [ebp + 0xc], edi
jle 0x4224cd
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov eax, dword [eax]
lea eax, [eax + ecx*2]
mov dword [ebp - 0x30], eax
jle 0x4224f9
sub edi, ecx
mov ecx, dword [ebp + 0x1c]
shl edi, 1
push edi
push eax
add ecx, ebx
lea eax, [eax + ecx*2]
push eax
call fcn.00410b0e
mov eax, dword [ebp - 0x30]
add esp, 0xc
cmp dword [ebp + 0x1c], 0
je 0x42250a
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.00410b58
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov cx, word [ebp - 0x24]
mov word [eax + esi*2], cx
push dword [ebp - 0x48]
call fcn.00431c1e
push dword [ebp + 0x18]
mov ecx, dword [ebp - 0x20]
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0xc]
push edi
call fcn.00421e41
movzx esi, ax
add esp, 0x24
or esi, dword [ebp - 0x20]
jmp 0x422555
lea ecx, [ebp - 8]
call fcn.00402b75
or esi, 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.00431c4c
lea ecx, [ebp - 0x14]
call fcn.00431c4c
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret