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

Disassembly:
push ebp
lea ebp, [esp - 0xc8]
sub esp, 0x148
mov eax, dword [0x417010]
xor eax, ebp
mov dword [ebp + 0xc4], eax
mov eax, dword [ebp + 0xd0]
push ebx
push edi
mov edi, dword [ebp + 0xd8]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0xd4]
mov dword [ebp - 0x7c], eax
push 0x104
lea eax, [ebp - 0x40]
xor ebx, ebx
push eax
push ebx
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x70], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40497f
push esi
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x6c], esi
cmp esi, 0xffffffff
je 0x40497e
push 0xcc
call fcn.00405dc3
pop ecx
cmp eax, ebx
je 0x40477a
push 8
mov ecx, eax
call fcn.004022a9
jmp 0x40477c
xor eax, eax
mov dword [0x418028], eax
cmp eax, ebx
je 0x404977
mov eax, dword [0x47a330]
push ebx
push ebx
add eax, 0x19a00
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x404950
cmp byte [ebp - 0x54], 0x43
jne 0x404968
cmp byte [ebp - 0x53], 0x48
jne 0x404968
cmp byte [ebp - 0x52], 0x56
jne 0x404968
push ebx
lea eax, [ebp - 0x60]
push eax
push 2
lea eax, [ebp - 0x58]
push eax
push esi
call edi
movzx eax, word [ebp - 0x58]
inc eax
push eax
call fcn.00405dc3
pop ecx
mov dword [ebp - 0x74], eax
cmp eax, ebx
je 0x404943
push ebx
lea ecx, [ebp - 0x60]
push ecx
movzx ecx, word [ebp - 0x58]
push ecx
push eax
push esi
call edi
movzx esi, word [ebp - 0x58]
xor edx, edx
cmp esi, ebx
jbe 0x40482c
mov ecx, esi
sub ecx, edx
and ecx, 7
lea eax, [esi + 0x55]
and eax, 0xff
shl eax, cl
mov ecx, dword [ebp - 0x74]
lea esi, [edx + ecx]
mov ecx, eax
shr ecx, 8
or cl, al
xor byte [esi], cl
movzx esi, word [ebp - 0x58]
inc edx
cmp edx, esi
jb 0x404803
movzx ecx, word [ebp - 0x58]
mov eax, dword [ebp - 0x74]
push dword [ebp - 0x80]
inc dword [ebp - 0x70]
push eax
mov byte [ecx + eax], bl
call fcn.00406991
pop ecx
pop ecx
test eax, eax
jne 0x404928
mov eax, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
push eax
mov dword [ebp - 0x68], eax
call fcn.00405dc3
pop ecx
mov dword [ebp - 0x64], eax
cmp eax, ebx
je 0x404937
push esi
call fcn.00405dc3
pop ecx
mov dword [ebp - 0x5c], eax
cmp eax, ebx
je 0x40490f
push ebx
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x68]
push dword [ebp - 0x64]
push dword [ebp - 0x6c]
call edi
mov eax, dword [0x418030]
mov ecx, dword [0x418028]
mov dword [0x47a308], esi
mov dword [0x47a31c], ebx
mov dword [0x47a314], 0x64
cmp eax, ebx
jbe 0x4048b6
push eax
push 0x417f18
jmp 0x4048b8
push ebx
push ebx
push dword [ebp - 0x68]
push ebx
push dword [ebp - 0x64]
push esi
push ebx
push dword [ebp - 0x5c]
call fcn.0040317e
mov ecx, dword [0x418028]
push ebx
push 0xdeadbeef
mov esi, eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x68]
push ebx
push dword [ebp - 0x64]
push esi
push ebx
push dword [ebp - 0x5c]
call fcn.0040220a
cmp eax, dword [ebp - 0x44]
je 0x4048f3
xor esi, esi
cmp esi, dword [ebp - 0x50]
je 0x4048fa
xor esi, esi
mov eax, dword [ebp - 0x7c]
mov dword [eax], esi
cmp esi, ebx
jne 0x40490f
push dword [ebp - 0x5c]
call fcn.00405d5a
pop ecx
mov dword [ebp - 0x5c], ebx
push dword [ebp - 0x68]
push ebx
push dword [ebp - 0x64]
call fcn.00405ce0
push dword [ebp - 0x64]
call fcn.00405d5a
add esp, 0x10
jmp 0x404937
push 1
push ebx
push dword [ebp - 0x4c]
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x74]
call fcn.00405d5a
mov esi, dword [ebp - 0x6c]
pop ecx
mov ecx, dword [0x418028]
push 8
call fcn.0040166e
push ebx
lea eax, [ebp - 0x60]
push eax
push 0x14
lea eax, [ebp - 0x54]
push eax
push esi
call edi
cmp dword [ebp - 0x60], 0x14
jae 0x4047a8
push dword [0x418028]
call fcn.00405d5a
mov edi, dword [ebp - 0x78]
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
cmp edi, ebx
je 0x404988
mov eax, dword [ebp - 0x70]
mov dword [edi], eax
mov ecx, dword [ebp + 0xc4]
mov eax, dword [ebp - 0x5c]
pop edi
xor ecx, ebp
pop ebx
call fcn.00405d65
add ebp, 0xc8
leave
ret