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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 8
push 0x407dd4
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [edi + 0xc], eax
test eax, eax
jne 0x4036d7
xor al, al
mov esp, ebp
pop ebp
ret 4
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_fread]
push esi
push eax
push 1
lea ecx, [ebp - 1]
push 1
push ecx
mov byte [ebp - 1], 0
call ebx
mov edx, dword [edi + 0xc]
push edx
push 1
push 2
push edi
call ebx
movzx eax, byte [ebp - 1]
mov edx, dword [edi + 0xc]
push edx
and eax, 0x3f
movzx ecx, word [eax*8 + 0x407a50]
xor word [edi], cx
push 1
lea esi, [edi + 4]
push 1
push esi
call ebx
movzx eax, byte [ebp - 1]
mov edx, dword [edi + 0xc]
push edx
and eax, 0x7f
mov cl, byte [eax*2 + 0x407950]
xor byte [esi], cl
push 1
lea esi, [edi + 2]
push 2
push esi
call ebx
movzx eax, byte [ebp - 1]
and eax, 0xf
shl eax, 5
movzx ecx, word [eax + 0x407a50]
xor word [esi], cx
movzx eax, word [esi]
xor ecx, ecx
add esp, 0x40
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004057c6
mov dword [edi + 8], eax
xor ebx, ebx
xor eax, eax
add esp, 4
mov dword [ebp - 8], ebx
cmp ax, word [esi]
jae 0x4038ce
lea ecx, [ecx]
mov ecx, dword [edi + 8]
movzx eax, bx
push 0x110
mov dword [ecx + eax*4], 0
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
test esi, esi
je 0x4038c0
push 0x104
push 0
lea ebx, [esi + 0x108]
push esi
mov dword [esi + 0x104], 0
mov dword [ebx], 0
mov dword [esi + 0x10c], 0
call sub.MSVCR100.dll_memset
movzx eax, byte [edi + 4]
dec eax
add esp, 0xc
cmp eax, 3
ja case.default.0x4037df
jmp dword [eax*4 + 0x40390c]
mov edx, dword [edi + 0xc]
push edx
push 1
lea eax, [esi + 0x104]
push 4
push eax
call dword [sym.imp.MSVCR100.dll_fread]
mov eax, dword [ebp - 8]
and eax, 0xf
shl eax, 5
movzx ecx, word [eax + 0x407a50]
add esp, 0x10
xor dword [esi + 0x104], ecx
jmp case.default.0x4037df
movzx eax, byte [ebp - 1]
push eax
mov eax, dword [ebp - 8]
mov ecx, edi
call fcn.00403920
mov ecx, dword [edi + 0xc]
push ecx
push 1
push 4
push ebx
call dword [sym.imp.MSVCR100.dll_fread]
movzx eax, word [ebp - 8]
and eax, 0x1f
shl eax, 4
movzx edx, word [eax + 0x407a50]
xor dword [ebx], edx
mov eax, dword [ebx]
push eax
call fcn.004057c6
mov edx, dword [ebx]
mov dword [esi + 0x10c], eax
mov ecx, dword [edi + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.MSVCR100.dll_fread]
movzx ecx, word [ebx]
mov eax, 0x80
add esp, 0x24
cmp cx, ax
jb 0x403879
mov ecx, eax
jmp 0x403880
xor edx, edx
cmp dx, cx
jae 0x4038b3
xor eax, eax
movzx edx, cx
jmp 0x403890
movzx ebx, byte [ebp - 1]
mov ecx, dword [esi + 0x10c]
add ebx, eax
add ebx, ebx
add ebx, ebx
and ebx, 0xff
mov bl, byte [ebx + 0x407950]
xor byte [ecx + eax], bl
inc eax
dec edx
jne 0x403890
movzx eax, word [ebp - 8]
mov edx, dword [edi + 8]
mov ebx, dword [ebp - 8]
mov dword [edx + eax*4], esi
inc ebx
mov dword [ebp - 8], ebx
cmp bx, word [edi + 2]
jb 0x403780
mov eax, dword [edi + 0xc]
mov esi, dword [sym.imp.MSVCR100.dll_fclose]
push eax
call esi
mov ecx, dword [ebp + 8]
push 0x4074b4
push ecx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 0xc
mov dword [edi + 0xc], eax
test eax, eax
je 0x403900
push eax
call esi
add esp, 4
mov dword [edi + 0xc], 0
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4