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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x45b480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], edx
test eax, eax
jne 0x412491
push 0x57
pop eax
jmp 0x4126c4
cmp dword [ecx], 2
je 0x41249a
push 0xc
jmp 0x41248b
mov eax, dword [ecx + 4]
push ebx
push esi
push edi
mov eax, dword [ecx + eax*4 + 0xc]
lea edi, [ebp - 0x204]
xor esi, esi
mov dword [ebp - 0x218], eax
push esi
lea ecx, [ebp - 0x20c]
mov dword [ebp - 0x20c], esi
push ecx
push 4
pop ecx
push ecx
mov ecx, edi
mov dword [ebp - 0x208], esi
push ecx
lea ecx, [ebp - 0x220]
mov ebx, 0x200
push ecx
push esi
push esi
push esi
push eax
mov dword [ebp - 0x210], ebx
call dword [sym.imp.ntdll.dll_NtReadFile]
test eax, eax
js 0x41269d
cmp eax, 0x103
je 0x41269d
push 4
pop eax
cmp dword [ebp - 0x21c], eax
jne 0x412691
lea eax, [edi + 4]
mov ecx, edi
cmp eax, edi
sbb edx, edx
add edx, 1
je 0x412535
push 4
pop ebx
mov eax, dword [ecx]
xor eax, 0xd0df97
ror eax, 0x17
mov dword [ecx], eax
add ecx, ebx
sub edx, 1
jne 0x41251c
mov ebx, dword [ebp - 0x210]
movzx eax, word [edi]
push 4
pop ecx
cmp ax, cx
jb 0x412691
cmp eax, ebx
jbe 0x412588
lea ecx, [ebp - 0x204]
push eax
cmp edi, ecx
jne 0x41256a
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov ecx, eax
test ecx, ecx
je 0x412686
mov eax, dword [edi]
mov dword [ecx], eax
jmp 0x41257d
push edi
call dword [sym.imp.msvcrt.dll_realloc]
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x412686
movzx eax, word [edi]
mov edi, ecx
mov dword [ebp - 0x210], eax
push 4
pop ebx
add dword [ebp - 0x20c], ebx
adc dword [ebp - 0x208], esi
movzx eax, word [edi]
sub eax, ebx
je 0x412645
push esi
add eax, 3
lea ecx, [ebp - 0x20c]
push ecx
and eax, 0xfffffffc
lea ebx, [edi + 4]
push eax
push ebx
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x220]
push eax
push esi
push esi
push esi
push dword [ebp - 0x218]
call dword [sym.imp.ntdll.dll_NtReadFile]
test eax, eax
js 0x41268a
cmp eax, 0x103
je 0x41268a
mov edx, dword [ebp - 0x214]
cmp dword [ebp - 0x21c], edx
jne 0x412691
lea eax, [ebx + edx]
mov dword [ebp - 0x228], esi
mov ecx, edx
shr ecx, 2
cmp eax, ebx
sbb eax, eax
not eax
and eax, ecx
mov dword [ebp - 0x224], eax
jbe 0x412636
push 4
mov edx, esi
mov ecx, eax
pop esi
mov eax, dword [ebx]
xor eax, 0xd0df97
ror eax, 0x17
mov dword [ebx], eax
add ebx, esi
inc edx
cmp edx, ecx
jb 0x41261b
mov edx, dword [ebp - 0x214]
xor esi, esi
add dword [ebp - 0x20c], edx
push 4
adc dword [ebp - 0x208], esi
pop ebx
mov edx, dword [ebp - 0x22c]
mov ecx, edi
call dword [ebp - 0x230]
test eax, eax
je 0x412696
push esi
lea eax, [ebp - 0x20c]
push eax
push ebx
push edi
lea eax, [ebp - 0x220]
push eax
push esi
push esi
push esi
push dword [ebp - 0x218]
call dword [sym.imp.ntdll.dll_NtReadFile]
test eax, eax
js 0x41269d
mov ebx, dword [ebp - 0x210]
jmp 0x4124f1
push 0xe
jmp 0x412693
cmp eax, 0xc0000011
jne 0x4126a4
push 0xb
pop esi
jmp 0x4126ad
mov esi, 0x4c7
jmp 0x4126ad
cmp eax, 0xc0000011
je 0x4126ad
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
lea eax, [ebp - 0x204]
cmp edi, eax
je 0x4126bf
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004488a4
leave
ret 4