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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xcb4
mov eax, dword [0x4163c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, 0x206
xor ebx, ebx
push esi
mov word [ebp - 0x440], ax
lea eax, [ebp - 0x43e]
push ebx
push eax
mov dword [ebp - 0xcac], ebx
call fcn.0040f1a0
xor eax, eax
push esi
mov word [ebp - 0x850], ax
lea eax, [ebp - 0x84e]
push ebx
push eax
call fcn.0040f1a0
xor eax, eax
push esi
mov word [ebp - 0x648], ax
lea eax, [ebp - 0x646]
push ebx
push eax
call fcn.0040f1a0
xor eax, eax
mov word [ebp - 0x18], ax
lea edi, [ebp - 0x16]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
push esi
mov word [ebp - 0xa58], ax
lea eax, [ebp - 0xa56]
push ebx
push eax
call fcn.0040f1a0
xor eax, eax
push esi
mov word [ebp - 0x238], ax
lea eax, [ebp - 0x236]
push ebx
push eax
call fcn.0040f1a0
add esp, 0x3c
mov esi, 0x104
push esi
lea eax, [ebp - 0x440]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push ebx
push ebx
push ebx
push esi
lea eax, [ebp - 0x648]
push eax
push esi
lea eax, [ebp - 0x850]
push eax
lea eax, [ebp - 0x440]
push eax
call fcn.0040c357
push ebx
push ebx
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x850]
push eax
lea eax, [ebp - 0x440]
push esi
push eax
call fcn.0040c57c
push 0x403e30
push esi
lea eax, [ebp - 0x440]
push eax
call fcn.0040c6a5
add esp, 0x48
lea eax, [ebp - 0xca8]
push eax
lea eax, [ebp - 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xcb0], eax
cmp eax, 0xffffffff
jne 0x40690b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406b88
push 4
pop edi
test byte [ebp - 0xca8], 0x10
je 0x406a37
mov ecx, 0x403e38
lea eax, [ebp - 0xc7c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40694a
cmp dx, bx
je 0x406946
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40694a
add eax, edi
add ecx, edi
cmp dx, bx
jne 0x406926
xor eax, eax
jmp 0x40694f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x406a37
mov ecx, 0x403e3c
lea eax, [ebp - 0xc7c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406986
cmp dx, bx
je 0x406982
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406986
add eax, edi
add ecx, edi
cmp dx, bx
jne 0x406962
xor eax, eax
jmp 0x40698b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x406a37
lea eax, [ebp - 0xc7c]
push eax
call fcn.0040c742
pop ecx
test eax, eax
je 0x406a37
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c752
lea eax, [ebp - 0xc7c]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e44
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e48
push 0x403e54
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x850]
push eax
lea eax, [ebp - 0xa58]
push esi
push eax
call fcn.0040c57c
add esp, 0x3c
lea eax, [ebp - 0xa58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406a37
inc dword [ebp - 0xcac]
lea eax, [ebp - 0xc7c]
push eax
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.0040c752
add esp, 0xc
lea eax, [ebp - 0xca8]
push eax
push dword [ebp - 0xcb0]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40690e
push dword [ebp - 0xcb0]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0xcac], 1
jle 0x406b14
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ecx, ax
xor eax, eax
mov word [ebp - 0x2c], ax
lea edi, [ebp - 0x2a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xa
stosw word es:[edi], ax
push 0xa
lea eax, [ebp - 0x2c]
push eax
push ecx
call fcn.0040c8c1
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c752
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e44
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e48
push 0x403e54
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x850]
push eax
lea eax, [ebp - 0xa58]
push esi
push eax
call fcn.0040c57c
add esp, 0x4c
lea eax, [ebp - 0xa58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406b14
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x18]
push 0xa
push eax
call fcn.0040c752
add esp, 0xc
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c752
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e44
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.0040c6a5
push 0x403e48
push 0x403e54
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x850]
push eax
lea eax, [ebp - 0x440]
push esi
push eax
call fcn.0040c57c
add esp, 0x3c
push 3
push ebx
lea eax, [ebp - 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [0x417b40], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bb7c
leave
ret