Function at 0x406bc0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
sub esp, 0x204
lea eax, [esp + 0x100]
push ebx
push ebp
push esi
push edi
push 0x104
mov ebx, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x50c53c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x110]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x400
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x114]
and ecx, 3
push 0x40
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
lea eax, [esp + 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406df7
push 0
push 0x80
push 3
push 0
push 1
lea ecx, [esp + 0x124]
push closesocket
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push eax
mov dword [ebx + 0x230], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebx + 0x238], eax
call fcn.0042cf07
mov ecx, dword [ebx + 0x238]
add esp, 4
lea edx, [ebx + 0x23c]
mov dword [ebx + 0x234], eax
push 0
push edx
mov edx, dword [ebx + 0x230]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebx + 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x238]
mov edx, dword [ebx + 0x234]
push 0x400
push ecx
push edx
call fcn.00406b80
mov eax, dword [ebx + 0x234]
push eax
call fcn.00406370
mov dword [0x51dadc], eax
mov ecx, dword [ebx + 0x234]
push ecx
call fcn.0042ce1e
mov edx, dword [0x51dadc]
add esp, 0x14
test edx, edx
je 0x406df7
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.Version
push edx
stosb byte es:[edi], al
call fcn.004067f0
add esp, 8
test eax, eax
je 0x406d68
call eax
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x51dadc]
push ecx
call fcn.00406880
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 4
lea edx, [esp + 0x10]
mov byte [ebp], 0xa4
push edx
call ebx
mov ecx, eax
lea esi, [esp + 0x10]
inc ecx
lea edi, [ebp + 1]
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]
lea ecx, [esp + 0x10]
push ecx
call ebx
mov esi, dword [esp + 0x218]
mov ebx, eax
push esi
add ebx, 2
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
lea edi, [ebx + ebp]
inc ecx
mov eax, dword [esp + 0x218]
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
push 0x42
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 4
mov ebx, dword [esp + 0x218]
mov byte [ebp], 0xa5
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
mov esi, ebx
inc ecx
lea edi, [ebp + 1]
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 2
push 0x42
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 4