Function at 0x403063
Capabilities:
Get common file path
Get disk information
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 8], 3
push esi
push edi
mov dword [ebp - 4], ebx
jbe 0x403085
mov esi, dword [0x406810]
cmp esi, ebx
jne 0x4031fe
cmp dword [ebp + 8], 0xffffffff
je 0x4030fd
mov edi, 0x406400
push ebx
push 0x1a
push edi
push ebx
mov esi, edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x4030b0
cmp byte [0x406400], 0
je 0x4030b0
inc esi
cmp byte [esi], 0
jne 0x4030aa
xor ebx, ebx
mov dword [esi], 0x6275535c
cmp dword [ebp + 0xc], ebx
mov dword [esi + 4], 0x646c6f46
mov dword [esi + 0xc], 0x747874
jg 0x4030f4
cmp dword [ebp + 8], ebx
je 0x4030df
cmp dword [ebp + 8], 1
mov dword [esi + 8], 0x2e465672
ja 0x403103
jmp 0x4030ed
mov dword [esi + 8], 0x2e435272
mov dword [esi + 0xc], 0x7a7874
mov eax, edi
jmp 0x4031d2
mov dword [esi + 8], 0x2e475072
jmp 0x403103
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0xc], ebx
push ebx
push 0x8000080
push 4
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x403361
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jg 0x40313f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403361
lea eax, [ebx + 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x403133
lea eax, [ebp - 0xc]
push 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
xor ebx, ebx
mov edi, esi
mov dword [ebp - 8], ebx
mov dword [eax + esi], ebx
cmp byte [esi], bl
je 0x4031c4
mov ecx, edi
mov al, byte [edi]
test al, al
je 0x403197
cmp al, 0xa
je 0x403187
inc edi
jmp 0x40317a
cmp byte [edi - 1], 0xd
jne 0x403193
and byte [edi - 1], 0
jmp 0x403196
and byte [edi], 0
inc edi
mov al, byte [ecx]
test al, al
je 0x4031bf
cmp dword [ebp + 0xc], ebx
je 0x4031b4
push ecx
push ebx
push 0x143
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4031bf
cmp al, 0x2d
je 0x4031bc
cmp al, 0x40
jle 0x4031bf
inc dword [ebp - 8]
cmp byte [edi], 0
jne 0x403178
cmp dword [ebp + 0xc], ebx
je 0x4031d7
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [ebp - 8]
mov edi, eax
shl edi, 2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [0x40680c], eax
je 0x4031df
cmp dword [ebp + 8], 0xffffffff
mov dword [0x406810], esi
je 0x4031d0
xor ebx, ebx
mov dword [ebp + 0xc], ebx
mov dword [ebp - 8], ebx
mov al, byte [esi]
mov ecx, esi
test al, al
mov dword [ebp - 0x10], ecx
je 0x403218
inc ecx
cmp byte [ecx], 0
jne 0x40320f
mov dword [ebp - 0x10], ecx
cmp al, 0x21
jne 0x403234
cmp dword [ebp - 4], ebx
mov dword [ebp + 0xc], ebx
jle 0x403345
mov dword [ebp - 8], 0x20
jmp 0x403345
cmp al, 0x2d
jne 0x403244
mov eax, 0x800
xor edi, edi
jmp 0x403319
cmp al, 0x40
jne 0x403253
lea eax, [esi + 1]
mov dword [ebp + 0xc], eax
jmp 0x403345
jle 0x403345
cmp dword [ebp + 0xc], ebx
jne 0x403261
mov dword [ebp + 0xc], esi
sub ecx, esi
cmp ecx, 4
jle 0x40333f
movzx eax, word [esi]
cmp eax, 0x5c5c
mov dword [ebp - 0xc], eax
je 0x4032ba
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, ebx
je 0x40333f
cmp eax, 4
je 0x4032ba
cmp eax, 5
je 0x4032ba
cmp eax, 2
je 0x4032ba
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, ebx
jl 0x40333f
test al, 0x10
jne 0x4032ba
mov eax, dword [ebp - 4]
lea edi, [eax + 0x8400]
xor eax, eax
jmp 0x403319
push 1
xor edx, edx
pop edi
lea eax, [esi + 1]
mov cl, byte [eax]
test cl, cl
je 0x4032ef
cmp cl, 0x5c
jne 0x4032d2
inc edi
mov edx, eax
jmp 0x4032ec
cmp cl, 0x81
jb 0x4032ec
cmp cl, 0x9f
jbe 0x4032e6
cmp cl, 0xe0
jb 0x4032ec
cmp cl, 0xfc
ja 0x4032ec
inc eax
cmp byte [eax], 0
je 0x4032ef
inc eax
jmp 0x4032c2
sub eax, edx
cmp eax, 1
jg 0x4032fc
mov word [edx], 0xa00
dec edi
cmp dword [edi*4 + 0x406778], ebx
lea edi, [edi*4 + 0x406778]
jne 0x403314
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [edi], eax
mov edi, dword [edi]
push 0x10
pop eax
push dword [ebp + 0xc]
or eax, dword [ebp - 8]
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_AppendMenuA]
test eax, eax
je 0x40333f
mov eax, dword [0x40680c]
mov ecx, dword [ebp - 4]
inc dword [ebp - 4]
mov dword [ebp - 8], ebx
mov dword [eax + ecx*4], esi
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 0xc], ebx
cmp dword [ecx], ebx
je 0x403358
lea esi, [ecx + 1]
cmp byte [esi], 0xa
jne 0x403204
inc esi
jmp 0x40334c
cmp dword [ebp - 4], ebx
jg 0x4031d0
push str._None
push 0x8310
push 1
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_AppendMenuA]
xor eax, eax
jmp 0x4031d2