Function at 0x4080a0
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
sub esp, 0x334
push ebx
mov ebx, dword [0x42c1cc]
push ebp
push esi
xor ebp, ebp
cmp dword [0x41f30c], ebp
push edi
mov edi, dword [esp + 0x348]
mov esi, str.PB_Compiler_Home
jle 0x408179
lea ebx, [ebx]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4080d5
sub eax, edx
cmp eax, ebx
jne 0x408102
mov eax, dword [0x42c1c8]
push ebx
push eax
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x4082a6
mov ebx, dword [0x42c1cc]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408107
sub eax, edx
mov cl, byte [esi + eax + 1]
lea esi, [esi + eax + 1]
add esi, 1
cmp cl, 6
jne 0x408167
cmp dword [0x41f014], 0
mov eax, esi
je 0x40814d
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408130
sub eax, edx
mov edx, dword [0x437db0]
sar eax, 1
add eax, eax
add edx, eax
add esi, edx
jmp 0x40816a
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408150
sub eax, edx
mov edx, dword [0x437db0]
add edx, eax
add esi, edx
jmp 0x40816a
add esi, 8
add ebp, 1
cmp ebp, dword [0x41f30c]
jl 0x4080d0
cmp dword [0x437e00], 0
jne 0x408406
xor eax, eax
jmp 0x408190
mov cl, byte [eax + 0x41f1c2]
mov byte [esp + eax + 0x150], cl
add eax, 1
test cl, cl
jne 0x408190
lea eax, [esp + 0x150]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4081b0
mov edx, dword [str.Residents.res]
mov ecx, dword [0x41c15c]
mov dword [eax], edx
mov edx, dword [0x41c160]
mov dword [eax + 4], ecx
mov ecx, dword [0x41c164]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
lea eax, [esp + 0x150]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4081e7
sub eax, edx
lea edx, [esp + 0x10]
lea ebp, [esp + eax + 0x14b]
push edx
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x408400
jmp 0x408220
test byte [esp + 0x10], 0x10
jne 0x4083e5
cmp dword [0x41f014], 0
je 0x4083be
mov ecx, dword [str.Unicode_]
mov dword [ebp], ecx
mov edx, dword [0x41c150]
mov dword [ebp + 4], edx
mov al, byte [0x41c154]
mov byte [ebp + 8], al
lea eax, [esp + 0x3c]
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x408258
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x408270
mov ecx, eax
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 + 0x150]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4083a2
push 1
jmp 0x4083d6
mov eax, esi
lea edx, [eax + 1]
jmp 0x4082b0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4082b0
sub eax, edx
lea esi, [esi + eax + 1]
movsx eax, byte [esi]
add esi, 1
sub eax, 3
je 0x40837f
sub eax, 2
je 0x408362
sub eax, 1
jne 0x4084f1
mov dword [edi], 0x19
cmp dword [0x41f014], 0
mov eax, esi
je 0x408307
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4082f4
sub eax, edx
sar eax, 1
add eax, eax
jmp 0x40831b
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408310
sub eax, edx
mov ecx, dword [0x437db0]
mov edx, dword [0x4203f4]
add ecx, eax
push ecx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [edi + 8], eax
je 0x408353
mov ecx, esi
call fcn.00402fe0
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov dword [0x42bc88], str.Out_of_Memory.
jmp 0x4084e7
mov dword [edi], 0x18
fld qword [esi]
fstp qword [edi + 8]
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov dword [edi], 0x17
mov eax, dword [esi]
mov dword [edi + 8], eax
mov ecx, dword [esi + 4]
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
lea eax, [esp + 0x3c]
mov edx, ebp
mov ecx, eax
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4083b0
jmp 0x4083d4
lea eax, [esp + 0x3c]
mov edx, ebp
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4083c8
push 0
lea eax, [esp + 0x154]
call fcn.00407f30
add esp, 4
lea edx, [esp + 0x10]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408220
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [0x42c1cc]
mov edi, dword [0x437e00]
test edi, edi
je 0x408486
mov esi, dword [edi + 4]
mov eax, dword [edi + 8]
add eax, esi
cmp esi, eax
jae 0x408480
lea esp, [esp]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408425
sub eax, edx
cmp eax, ebx
jne 0x40844d
mov ecx, dword [0x42c1c8]
push ebx
push ecx
push esi
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x4084fc
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408452
mov ecx, dword [edi + 0x14]
sub eax, edx
mov edx, dword [edi + 0xc]
push edx
lea eax, [eax + esi + 1]
push eax
call ecx
mov edx, dword [edi + 8]
add edx, dword [edi + 4]
mov ebx, dword [0x42c1cc]
mov esi, eax
add esp, 8
cmp esi, edx
jb 0x408420
mov edi, dword [edi]
test edi, edi
jne 0x408410
cmp dword [0x4205cc], 0
jne 0x4084f1
mov edx, dword [0x42c1c8]
mov ecx, 5
mov esi, str.Constant_not_found:_
mov edi, 0x420430
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push ebx
push edx
push 0x420430
movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll_strncat
mov eax, 0x420430
add esp, 0xc
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4084c0
mov cx, word [0x41c10c]
mov dl, byte [0x41c10e]
mov word [eax], cx
mov byte [eax + 2], dl
mov dword [0x42bc88], 0x420430
mov dword [0x4205cc], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408501
mov ecx, dword [edi + 0xc]
sub eax, edx
mov edx, dword [esp + 0x348]
push ecx
mov ecx, dword [edi + 0x10]
push edx
lea eax, [eax + esi + 1]
push eax
call ecx
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x334
ret