Function at 0x4065e0
Capabilities:
Encode data using xor
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x43b96b
push eax
mov eax, 0x1868
mov dword fs:[0], esp
call fcn.0043b050
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
mov esi, dword [esp + 0x1888]
mov al, 6
mov byte [esp + 0x26], al
mov byte [esp + 0x2d], al
lea eax, [esp + 0x54]
xor ebp, ebp
mov bl, 5
mov dl, 7
mov cl, 2
push eax
push esi
mov dword [esp + 0x1888], ebp
mov dword [esp + 0x40], ebp
mov byte [esp + 0x28], 1
mov byte [esp + 0x29], 3
mov byte [esp + 0x2a], bl
mov byte [esp + 0x2b], dl
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], 4
mov byte [esp + 0x2f], 8
mov byte [esp + 0x30], 1
mov byte [esp + 0x31], cl
mov byte [esp + 0x32], 3
mov byte [esp + 0x33], 4
mov byte [esp + 0x34], bl
mov byte [esp + 0x36], dl
mov byte [esp + 0x37], 8
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], ebp
call dword [sym.imp.MSVCRT.dll__stat]
or edi, 0xffffffff
add esp, 8
cmp eax, edi
je 0x4066ae
push 0x1b6
push 0x8000
push esi
call dword [sym.imp.MSVCRT.dll__open]
add esp, 0xc
cmp eax, edi
mov dword [esp + 0x10], eax
jne 0x4066c5
lea ecx, [esp + 0x14]
mov dword [esp + 0x1880], edi
call sub.MFC42.DLL_CString::CString
mov eax, edi
jmp 0x4068c1
lea ecx, [esp + 0x878]
lea ebx, [esp + 0x1078]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.MSVCRT.dll__read]
mov esi, 0x800
sub esi, ecx
push esi
push ebx
push edx
call edi
mov ebp, eax
add esp, 0xc
cmp ebp, 0xffffffff
jne 0x40671d
call dword [sym.imp.MSVCRT.dll__errno]
cmp dword [eax], 4
jne 0x40671d
mov eax, dword [esp + 0x10]
push esi
push ebx
push eax
call edi
mov ebp, eax
add esp, 0xc
cmp ebp, 0xffffffff
je 0x4066ff
test ebp, ebp
jl 0x40684b
je 0x406792
mov edi, dword [esp + 0x1c]
cmp ebp, esi
mov ecx, ebp
mov esi, ebx
jae 0x40674f
mov edx, ecx
mov eax, dword [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebx, ebp
and ecx, 3
add eax, ebp
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
jmp 0x40675d
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
add eax, ebp
cmp eax, 0x800
mov dword [esp + 0x18], eax
jb 0x4066db
cmp dword [esp + 0x40], 1
jne 0x40679c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40689d
cmp eax, 0x800
jne 0x406863
jmp 0x4067ab
mov dword [esp + 0x40], 1
jmp 0x406779
mov eax, dword [esp + 0x18]
cmp eax, 0x800
jne 0x406852
mov ecx, dword [esp + 0x38]
lea ebx, [esp + 0x878]
add ecx, eax
lea edi, [esp + 0x78]
mov dword [esp + 0x38], ecx
xor esi, esi
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
add ebx, 8
mov dword [esp + 0x30], ecx
test esi, esi
mov dword [esp + 0x34], edx
jne 0x4067f6
lea eax, [esp + 0x20]
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push 1
call fcn.00404000
add esp, 0x10
cmp eax, 0xffffffff
je 0x40684b
jmp 0x40680c
xor eax, eax
mov cl, byte [esp + eax + 0x4c]
mov dl, byte [esp + eax + 0x30]
xor cl, dl
mov byte [esp + eax + 0x44], cl
inc eax
cmp eax, 8
jb 0x4067f8
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
mov dword [edi], edx
mov edx, dword [esp + 0x34]
mov dword [edi + 4], eax
add edi, 8
inc esi
cmp esi, 0x100
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
jb 0x4067c2
cmp dword [esp + 0x3c], 1
je 0x406859
mov dword [esp + 0x3c], 0
xor ebp, ebp
jmp 0x4066c5
mov eax, dword [esp + 0x10]
push eax
jmp 0x406868
mov edx, dword [esp + 0x10]
push edx
jmp 0x406868
cmp dword [esp + 0x78], 0xb9
je 0x40688a
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x1880], 0xffffffff
call sub.MFC42.DLL_CString::CString
or eax, 0xffffffff
jmp 0x4068c1
mov edi, dword [esp + 0x188c]
mov ecx, 0x2e
lea esi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x1880], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x1878]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1874
ret