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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x68]
push ebx
push edi
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41246e
pop edi
xor eax, eax
pop ebx
add esp, 0x60
ret
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x3c]
push 0x32
push edx
push edi
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 1
call ebx
cmp dword [esp + 0x54], 0x382e4441
je 0x4124ae
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop ebx
add esp, 0x60
ret
mov eax, dword [esp + 0x5e]
push ebp
push esi
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x6e]
mov ebp, eax
push ecx
call sub.MFC42.DLL_operatornew
add esp, 8
mov esi, eax
mov eax, dword [esp + 0x66]
lea edx, [esp + 0x18]
push 0
push edx
push eax
push ebp
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x66]
push ecx
push ebp
call fcn.0040f300
mov ecx, dword [esp + 0x6a]
add esp, 8
cmp ecx, eax
jne 0x41277e
mov ecx, dword [esp + 0x66]
xor ebx, ebx
xor eax, eax
cmp ecx, ebx
jbe 0x412519
mov cl, byte [eax + ebp]
xor cl, al
mov byte [eax + ebp], cl
mov ecx, dword [esp + 0x66]
inc eax
cmp eax, ecx
jb 0x412508
push esi
push ebp
call fcn.00413590
mov ecx, dword [esp + 0x72]
add esp, 8
cmp ecx, eax
jne case.0x412544.10
mov eax, dword [esp + 0x74]
cmp eax, 0x23
ja case.0x412544.10
xor edx, edx
mov dl, byte [eax + 0x4127f4]
jmp dword [edx*4 + 0x4127c8]
mov eax, dword [esi + 0x40]
shr eax, 3
and eax, 1
cmp eax, ebx
je case.0x412544.10
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
xor ecx, ecx
mov dx, word [esp + 0x2c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov ax, word [esi + 0x54]
mov word [esp + 0x1c], ax
mov cx, word [esi + 0x56]
mov word [esp + 0x1e], cx
mov di, word [esi + 0x58]
cmp dx, ax
mov word [esp + 0x22], di
ja 0x4125b3
jb 0x4125b7
mov ax, word [esp + 0x2e]
cmp ax, cx
ja 0x4125b3
jb 0x4125b7
cmp word [esp + 0x32], di
jbe 0x4125b7
mov dword [esp + 0x10], ebx
lea edx, [esp + 0x1c]
push edx
call fcn.0040f360
add esp, 4
test eax, eax
jne 0x41263b
mov dword [esp + 0x10], ebx
jmp 0x412678
mov eax, dword [esi + 0x40]
shr eax, 4
jmp 0x412551
test byte [esi + 0x40], 8
jmp 0x4125e6
test byte [esi + 0x40], 0x10
je case.0x412544.10
test byte [esi + 0x44], 0x40
jne case.0x412544.0
jmp case.0x412544.10
mov eax, dword [esi + 0x40]
shr eax, 5
jmp 0x412551
mov eax, dword [esi + 0x40]
jmp 0x412551
mov eax, dword [esi + 0x40]
shr eax, 6
jmp 0x412551
mov eax, dword [esi + 0x40]
shr eax, 1
jmp 0x412551
mov eax, dword [esi + 0x40]
test al, 8
jne case.0x412544.0
test al, 0x10
je case.0x412544.10
jmp case.0x412544.0
mov eax, dword [esi + 0x44]
test al, 1
je 0x412664
test al, 6
mov dword [esp + 0x14], 0xa
je 0x412656
mov dword [esp + 0x14], 0x14
test al, 0x30
je 0x412678
mov dword [esp + 0x14], 0x1e
jmp 0x412678
test byte [esi + 0x48], 2
je 0x412670
mov dword [esp + 0x10], ebx
jmp 0x412678
mov dword [esp + 0x14], 5
mov eax, dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [sym.imp.MSVCRT.dll_malloc]
push eax
push ecx
call fcn.00417cc0
add esp, 8
test eax, eax
je case.0x412544.10
push ebx
push ebx
push 0x1080001
push ebx
push ebx
call fcn.00418290
mov edi, dword [esp + 0x98]
add esp, 0x14
cmp eax, ebx
mov dword [edi], eax
je case.0x412544.10
mov edx, dword [esp + 0x78]
push ebx
push edx
push 0x28100008
push ebx
push eax
call fcn.00418290
mov eax, dword [edi]
push ebx
push ebx
push 0x1080001
push ebx
push eax
call fcn.00418290
mov ecx, dword [esi + 8]
mov ebx, dword [sym.imp.USER32.dll_OemToCharA]
add esp, 0x28
mov edi, eax
lea eax, [ecx + esi]
push eax
push eax
call ebx
mov edx, dword [esi + 0xc]
lea eax, [edx + esi]
push eax
push eax
call ebx
mov eax, dword [esi + 0x14]
add eax, esi
push eax
push eax
call ebx
mov ecx, dword [esi + 8]
push 0
add ecx, esi
push ecx
push 0x28100007
push 0
push edi
call fcn.00418290
push 0
push str.AVP_Key_v1.0
push 0x2801000d
push 0
push edi
call fcn.00418290
mov edx, dword [esi + 0xc]
push 0
add edx, esi
push edx
push 0x28010008
push 0
push edi
call fcn.00418290
mov eax, dword [esi + 0x14]
push 0
add eax, esi
push eax
push 0x28010009
push 0
push edi
call fcn.00418290
add esp, 0x50
cmp word [esp + 0x22], 0
je 0x41277e
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41277e
lea ecx, [esp + 0x1c]
push 8
push ecx
push 0xb010004
push 0
push edi
call fcn.00418290
add esp, 0x14
xor ebx, ebx
push ebp
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x84]
add esp, 8
cmp ecx, ebx
pop esi
pop ebp
je 0x4127aa
mov eax, dword [ecx]
mov edx, dword [esp + 0xc]
cmp eax, edx
ja 0x4127a8
mov eax, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x78]
cmp eax, ebx
je 0x4127bc
mov edx, dword [esp + 8]
mov ecx, dword [eax]
or ecx, edx
mov dword [eax], ecx
pop edi
mov eax, 1
pop ebx
add esp, 0x60
ret