Function at 0x40aa20
Capabilities:
Get file attributes
Get file size
Read file on windows

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x38]
push ebx
push ebp
push esi
xor esi, esi
mov ebp, ecx
cmp eax, esi
push edi
mov dword [esp + 0x10], ebp
je 0x40b02b
mov al, byte [ebp + 0x431]
mov dword [esp + 0x28], 1
test al, al
mov dword [esp + 0x2c], 0xa
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x34], 0x1e
mov dword [esp + 0x38], 0x32
mov dword [esp + 0x3c], 0x64
mov dword [esp + 0x40], esi
je 0x40aa81
mov ebx, dword [ebp + 0x428]
jmp 0x40aa83
xor ebx, ebx
test al, al
mov dword [esp + 0x14], ebx
je 0x40aa97
mov ecx, dword [ebp + 0x42c]
mov dword [esp + 0x18], ecx
jmp 0x40aa9b
mov dword [esp + 0x18], esi
cmp ebx, esi
je 0x40aaad
test al, al
jne 0x40ac7f
mov ebp, dword [esp + 0x10]
xor esi, esi
cmp ebx, esi
mov dword [ebp + 0x434], 0xffffffff
mov byte [ebp + 0x438], 0
je 0x40aad8
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp + 0x42c], esi
mov dword [ebp + 0x428], esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push ebp
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ab78
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, esi
jne 0x40ab3c
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40ab12
mov eax, 0x42a800
mov edx, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
push edx
push eax
push esi
call fcn.00411fe0
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
add esp, 0xc
mov ecx, ebp
push esi
push eax
push edi
call fcn.00409a40
jmp 0x40b0ef
cmp esi, 0xffffffff
jne 0x40ab78
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea ebp, [esp + 0x28]
mov eax, dword [ebp]
test eax, eax
je 0x40aba0
push eax
add ebp, 4
call ebx
mov ecx, dword [esp + 0x10]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x40ab4b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40abc2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40b0da
jmp 0x40b0d5
cmp esi, 0xffffffff
jne 0x40ab78
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40abb2
mov eax, 0x42a800
mov edx, dword [esp + 0x58]
push edx
push eax
mov eax, dword [esp + 0x5c]
push eax
jmp 0x40b0e5
cmp ebp, 2
jae 0x40ac07
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40abdb
mov eax, 0x42a800
mov ecx, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
push ecx
push eax
push esi
call fcn.00411fe0
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push esi
push edx
push edi
call fcn.00409a40
jmp 0x40b0ef
lea eax, [ebp + 2]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea ecx, [esp + 0x20]
mov ebx, eax
push 0
push ecx
push ebp
push ebx
push esi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b0b8
cmp dword [esp + 0x20], ebp
jne 0x40b0b8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
test ebp, ebp
jle 0x40ac58
cmp byte [eax + ebx], 0
jne 0x40ac53
mov byte [eax + ebx], 0x20
inc eax
cmp eax, ebp
jl 0x40ac49
mov eax, dword [esp + 0x10]
mov byte [ebx + ebp], 0
mov byte [ebx + ebp + 1], 0
mov dword [esp + 0x18], ebp
mov cl, byte [eax + 0x431]
test cl, cl
je 0x40ac7f
mov dword [eax + 0x428], ebx
mov dword [eax + 0x42c], ebp
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x48]
mov edi, dword [eax + 0x434]
test edi, edi
jl 0x40acdd
mov esi, ebp
add eax, 0x438
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40acbc
test cl, cl
je 0x40acb8
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40acbc
add eax, 2
add esi, 2
test cl, cl
jne 0x40ac98
xor eax, eax
jmp 0x40acc1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40acdd
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x42c]
sub ecx, 2
cmp edi, ecx
jge 0x40acdd
mov esi, edi
jmp 0x40aded
push 0x5b
push ebx
call dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x40adf1
mov eax, dword [esp + 0x18]
mov edx, edi
sub edx, ebx
cmp edx, eax
jge 0x40adf1
mov esi, dword [sym.imp.MSVCRT.dll_toupper]
lea eax, [edi + 1]
mov dword [esp + 0x1c], eax
movsx eax, byte [eax]
push eax
call esi
movsx ecx, byte [ebp]
mov edx, eax
push ecx
mov dword [esp + 0x2c], edx
call esi
mov edx, dword [esp + 0x2c]
add esp, 8
cmp edx, eax
jne 0x40adc3
lea esi, [edi - 1]
cmp esi, ebx
jb 0x40ad6c
mov al, byte [esi]
cmp al, 0xa
je 0x40ad57
movsx eax, al
push eax
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x40ad57
dec esi
cmp esi, ebx
jae 0x40ad39
jmp 0x40ad6c
cmp esi, ebx
jb 0x40ad6c
movsx ecx, byte [esi]
push ecx
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x40adc3
mov al, byte [ebp + 1]
mov esi, 1
test al, al
je 0x40adb2
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
movsx eax, byte [edx + esi]
push eax
call dword [sym.imp.MSVCRT.dll_toupper]
movsx ecx, byte [esi + ebp]
mov edx, eax
push ecx
mov dword [esp + 0x2c], edx
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [esp + 0x2c]
add esp, 8
cmp eax, edx
jne 0x40adb2
mov ebp, dword [esp + 0x48]
inc esi
cmp byte [esi + ebp], 0
jne 0x40ad7c
mov eax, dword [esp + 0x48]
cmp byte [esi + eax], 0
jne 0x40adc3
cmp byte [esi + edi + 1], 0x5d
je 0x40ade3
mov ecx, dword [esp + 0x1c]
push 0x5b
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebp, dword [esp + 0x50]
mov edi, eax
add esp, 8
test edi, edi
jne 0x40acf3
jmp 0x40adf1
mov ebp, dword [esp + 0x48]
sub esi, ebx
lea esi, [esi + edi + 2]
test esi, esi
jne 0x40ae40
mov esi, dword [esp + 0x10]
mov al, byte [esi + 0x431]
test al, al
jne 0x40ae0d
test ebx, ebx
je 0x40ae0d
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40ae1a
mov eax, 0x42a800
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
push edx
push eax
push edi
call fcn.00411fe0
mov eax, dword [esp + 0x58]
add esp, 0xc
mov ecx, esi
push edi
push eax
push ebp
call fcn.00409a40
jmp 0x40b0ef
mov eax, dword [esp + 0x10]
push 0x100
push ebp
mov dword [eax + 0x434], esi
add eax, 0x438
push eax
call fcn.00411fe0
add esi, ebx
add esp, 0xc
test esi, esi
je 0x40af58
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, esi
sub ecx, edx
cmp ecx, eax
jge 0x40af58
movsx edx, byte [esi]
mov edi, dword [sym.imp.MSVCRT.dll_isspace]
push edx
call edi
add esp, 4
test eax, eax
je 0x40ae9e
movsx eax, byte [esi + 1]
inc esi
push eax
call edi
add esp, 4
test eax, eax
jne 0x40ae8f
mov bl, byte [esi]
cmp bl, 0x5b
je 0x40af58
mov ebp, dword [esp + 0x4c]
mov edi, dword [sym.imp.MSVCRT.dll_toupper]
movsx ecx, byte [ebp]
push ecx
call edi
mov edx, eax
movsx eax, bl
push eax
mov dword [esp + 0x2c], edx
call edi
mov ecx, dword [esp + 0x2c]
add esp, 8
cmp eax, ecx
jne 0x40af41
mov al, byte [ebp + 1]
inc ebp
test al, al
mov dword [esp + 0x1c], 1
je 0x40af1f
mov eax, dword [esp + 0x4c]
mov edi, esi
sub edi, eax
movsx edx, byte [edi + ebp]
mov ebx, dword [sym.imp.MSVCRT.dll_toupper]
push edx
call ebx
mov edx, eax
movsx eax, byte [ebp]
push eax
mov dword [esp + 0x2c], edx
call ebx
mov ecx, dword [esp + 0x2c]
add esp, 8
cmp eax, ecx
jne 0x40af1f
mov edx, dword [esp + 0x1c]
mov al, byte [ebp + 1]
inc edx
inc ebp
test al, al
mov dword [esp + 0x1c], edx
jne 0x40aee9
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
cmp byte [eax + edx], 0
jne 0x40af41
add esi, eax
mov al, byte [esi]
cmp al, 9
je 0x40af39
cmp al, 0x20
jne 0x40af3c
inc esi
jmp 0x40af2f
cmp byte [esi], 0x3d
je 0x40afaf
inc esi
push 0xa
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x40ae68
mov esi, dword [esp + 0x10]
mov al, byte [esi + 0x431]
test al, al
jne 0x40af78
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40af78
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40af85
mov eax, 0x42a800
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
push ecx
push eax
push edi
call fcn.00411fe0
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
add esp, 0xc
mov ecx, esi
push edi
push edx
push eax
call fcn.00409a40
jmp 0x40b0ef
mov al, byte [esi + 1]
inc esi
cmp al, 9
je 0x40afaf
cmp al, 0x20
je 0x40afaf
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
xor edi, edi
lea ebx, [eax - 1]
test ebx, ebx
jle 0x40afed
mov edx, ebp
mov eax, esi
sub edx, esi
mov cl, byte [eax]
cmp cl, 0xd
mov byte [edx + eax], cl
je 0x40afed
mov cl, byte [eax]
cmp cl, 0xa
je 0x40afed
test cl, cl
je 0x40afed
inc edi
inc eax
cmp edi, ebx
jl 0x40afd2
dec edi
js 0x40b007
mov esi, dword [sym.imp.MSVCRT.dll_isspace]
movsx ecx, byte [edi + ebp]
push ecx
call esi
add esp, 4
test eax, eax
je 0x40b037
dec edi
jns 0x40aff6
mov byte [ebp], 0
mov eax, dword [esp + 0x10]
mov cl, byte [eax + 0x431]
test cl, cl
jne 0x40b02b
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40b02b
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret 0x14
test edi, edi
jl 0x40b007
mov byte [edi + ebp + 1], 0
mov al, byte [ebp]
cmp al, 0x22
jne 0x40b08b
cmp byte [edi + ebp], 0x22
jne 0x40b08b
cmp edi, 2
jge 0x40b076
mov edi, 0x42a800
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40b00b
dec edi
lea ecx, [ebp + 1]
push edi
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov byte [edi + ebp], 0
dec edi
mov edx, dword [esp + 0x10]
mov al, byte [edx + 0x431]
test al, al
jne 0x40b0ab
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40b0ab
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40b0cd
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40b0da
mov eax, 0x42a800
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
push ecx
push eax
push edx
call fcn.00411fe0
add esp, 0xc
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
pop edi
dec ecx
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x34
ret 0x14