Function at 0x409305
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Get geographical location
Identify system language via api

Disassembly:
push ebp
lea ebp, [esp - 0xa38]
sub esp, 0xab8
mov eax, dword [0x417c2c]
xor eax, ebp
mov dword [ebp + 0xa34], eax
mov eax, dword [ebp + 0xa50]
and word [ebp + 0x208], 0
push ebx
mov ebx, dword [ebp + 0xa4c]
push esi
mov esi, dword [ebp + 0xa40]
push edi
mov edi, dword [ebp + 0xa44]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0xa58]
push 0x7fe
mov dword [ebp - 0x74], eax
lea eax, [ebp + 0x20a]
push 0
push eax
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x78], ebx
call sub.MSVCR80.dll_memset
or dword [ebp - 0x54], 0xffffffff
xor eax, eax
add esp, 0xc
cmp word [esi], ax
mov dword [ebp - 0x50], 0x80004005
je 0x409713
cmp word [edi], ax
je 0x409713
cmp ebx, eax
je 0x409390
mov dword [ebx], eax
push 0xffffffffffffffff
push esi
mov esi, 0x400
lea eax, [ebp + 0x208]
push esi
push eax
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
mov ebx, dword [sym.imp.MSVCR80.dll_wcslen]
lea eax, [ebp + 0x208]
push eax
call ebx
mov edi, dword [sym.imp.MSVCR80.dll_wcsncat_s]
add esp, 0x14
cmp word [ebp + eax*2 + 0x206], 0x5c
je 0x4093dd
push 0xffffffffffffffff
push 0x415a2c
lea eax, [ebp + 0x208]
push esi
push eax
call edi
add esp, 0x10
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4093f9
mov eax, 0x80004005
jmp 0x409718
lea eax, [ebp + 0x208]
push eax
call ebx
mov ebx, 0x3ff
cmp eax, ebx
pop ecx
jae 0x40941f
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
mov dword [ebp - 0x58], eax
jmp 0x409422
mov dword [ebp - 0x58], ebx
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
mov ecx, eax
shr ecx, 0x10
and ecx, 0xf
mov dword [ebp - 0x6c], eax
shl ecx, 0x10
and eax, ebx
or ecx, eax
or ecx, esi
xor eax, eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], 0x409
mov dword [ebp - 0x4c], eax
xor ecx, ecx
test eax, eax
jle 0x40946b
mov edx, dword [ebp + eax*4 - 0x6c]
cmp dword [ebp + ecx*4 - 0x6c], edx
je 0x409463
inc ecx
cmp ecx, eax
jl 0x409458
cmp ecx, eax
jl 0x409579
mov ecx, dword [ebp - 0x58]
and word [ebp + ecx*2 + 0x208], 0
push 0xa
lea ebx, [ebp + eax*4 - 0x6c]
mov eax, dword [ebx]
push 0xa
lea ecx, [ebp + 0xa08]
push ecx
push eax
call dword [sym.imp.MSVCR80.dll__itow_s]
push 0xffffffffffffffff
lea eax, [ebp + 0xa08]
push eax
lea eax, [ebp + 0x208]
push esi
push eax
call edi
push 0xffffffffffffffff
push 0x415a2c
lea eax, [ebp + 0x208]
push esi
push eax
call edi
push 0xffffffffffffffff
push dword [ebp - 0x60]
lea eax, [ebp + 0x208]
push esi
push eax
call edi
add esp, 0x40
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409571
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp dword [ebx], 0x409
mov dword [ebp - 0x70], eax
je 0x4095eb
mov ax, word [ebx]
or ax, si
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
cmp cx, 1
je 0x409571
cmp cx, 0xd
je 0x409571
mov ebx, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push 0xc
lea ecx, [ebp + 0xa1c]
movzx eax, ax
push ecx
push 0xb
push eax
mov dword [ebp - 0x80], eax
call ebx
lea eax, [ebp + 0xa1c]
push eax
call dword [sym.imp.MSVCR80.dll__wtoi]
pop ecx
push 0xc
mov dword [ebp - 0x7c], eax
lea eax, [ebp + 0xa1c]
push eax
push 0x1004
push dword [ebp - 0x80]
call ebx
lea eax, [ebp + 0xa1c]
push eax
call dword [sym.imp.MSVCR80.dll__wtoi]
pop ecx
mov ecx, dword [ebp - 0x70]
cmp ecx, 0xfde9
je 0x4095eb
cmp ecx, dword [ebp - 0x7c]
je 0x4095eb
cmp ecx, eax
je 0x4095eb
mov eax, dword [ebp - 0x4c]
mov ebx, 0x3ff
inc eax
cmp eax, 3
mov dword [ebp - 0x4c], eax
jb 0x40944e
mov eax, dword [ebp - 0x58]
and word [ebp + eax*2 + 0x208], 0
push 0xffffffffffffffff
push 0x4155e0
lea eax, [ebp + 0x208]
push esi
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x4c], eax
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
cmp eax, ebx
pop ecx
jae 0x4095dc
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
mov ebx, eax
cmp dword [ebp - 0x4c], 0xffffffff
je 0x40970e
jmp 0x40967c
mov eax, dword [ebp - 0x4c]
mov eax, dword [ebp + eax*4 - 0x6c]
and dword [ebp - 0x50], 0
mov dword [ebp - 0x54], eax
jmp 0x4096b4
test byte [ebp - 0x48], 0x10
je 0x40967c
lea eax, [ebp - 0x1c]
push 0x414b1c
push eax
call dword [sym.imp.MSVCR80.dll_wcscmp]
test eax, eax
pop ecx
pop ecx
je 0x40967c
lea eax, [ebp - 0x1c]
push 0x4155d8
push eax
call dword [sym.imp.MSVCR80.dll_wcscmp]
test eax, eax
pop ecx
pop ecx
je 0x40967c
and word [ebp + ebx*2 + 0x202], 0
push 0xffffffffffffffff
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x208]
push esi
push eax
call edi
push 0xffffffffffffffff
push 0x415a2c
lea eax, [ebp + 0x208]
push esi
push eax
call edi
push 0xffffffffffffffff
push dword [ebp - 0x60]
lea eax, [ebp + 0x208]
push esi
push eax
call edi
add esp, 0x30
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x409693
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4095fe
jmp 0x4096a5
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCR80.dll__wtol]
and dword [ebp - 0x50], 0
pop ecx
mov dword [ebp - 0x54], eax
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x50], 0
jl 0x40970e
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x4096c0
mov ecx, dword [ebp - 0x54]
mov dword [eax], ecx
mov esi, dword [ebp - 0x78]
test esi, esi
je 0x4096ef
push dword [ebp + 0xa48]
lea eax, [ebp + 0x208]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x5c], 0
je 0x40970e
lea eax, [ebp + 0x208]
push eax
push dword [ebp + 0xa54]
push dword [ebp - 0x5c]
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
mov eax, dword [ebp - 0x50]
jmp 0x409718
mov eax, 0x80070057
mov ecx, dword [ebp + 0xa34]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bb82
add ebp, 0xa38
leave
ret