Function at 0x405411
Capabilities:
Enumerate files on windows
Identify system language via api
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6cc
mov eax, dword [0x407014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x6a0], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x694], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x6a8], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x69c], ecx
mov dword [ebp - 0x6b0], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x6a4], esi
push edi
test edx, edx
je 0x405a31
xor ebx, ebx
cmp word [edx], bx
je 0x405a31
test ecx, ecx
je 0x405a31
cmp word [ecx], bx
je 0x405a31
push 0xffffffffffffffff
mov dword [esi], ebx
lea eax, [ebp - 0x434]
push edx
mov esi, 0x104
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
test eax, eax
jne 0x405a2a
lea ecx, [ebp - 0x434]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4054b0
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x436], 0x5c
je 0x4054ea
push 0xffffffffffffffff
push 0x4011ac
lea eax, [ebp - 0x434]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
test eax, eax
jne 0x405a2a
lea eax, [ebp - 0x434]
mov dword [ebp - 0x688], 0x80070002
mov dword [ebp - 0x6cc], eax
lea edi, [ebp - 0x18]
lea eax, [ebp - 0x69c]
mov dword [ebp - 0x6c8], eax
lea eax, [ebp - 0x6a0]
mov dword [ebp - 0x6c4], eax
lea eax, [ebp - 0x6a4]
mov dword [ebp - 0x6c0], eax
lea eax, [ebp - 0x6a8]
mov dword [ebp - 0x6bc], eax
lea eax, [ebp - 0x694]
mov dword [ebp - 0x6b8], eax
lea eax, [ebp + 0x1c]
mov dword [ebp - 0x6b4], eax
xor eax, eax
stosd dword es:[edi], eax
push 6
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x18]
push eax
push 0x4011b0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40558b
cmp eax, 6
jae 0x40558b
lea eax, [ebp - 0x688]
push eax
push 0xa
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x6cc]
call fcn.0040506e
cmp dword [ebp - 0x688], ebx
je 0x4056fb
mov eax, dword [0x408a88]
mov edi, dword [sym.imp.KERNEL32.dll_DecodePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x4055cb
push 0x4011c0
call ebx
test eax, eax
je 0x405702
push 0x4011dc
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x408a88], eax
jmp 0x4055d0
push eax
call edi
mov esi, eax
test esi, esi
je 0x405702
xor eax, eax
push eax
push eax
push 0x4011fc
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4055fc
push eax
push eax
push pe_nt_image_headers32
call esi
test eax, eax
je 0x405a2a
xor eax, eax
mov dword [ebp - 0x690], eax
mov dword [ebp - 0x698], eax
mov eax, dword [0x408a8c]
test eax, eax
jne 0x40563e
push 0x4011c0
call ebx
test eax, eax
je 0x40577c
push 0x401220
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x408a8c], eax
jmp 0x405643
push eax
call edi
mov esi, eax
test esi, esi
je 0x40577c
lea eax, [ebp - 0x690]
xor ebx, ebx
push eax
push ebx
lea eax, [ebp - 0x698]
push eax
push 0x34
call esi
test eax, eax
je 0x405a2a
mov eax, dword [ebp - 0x690]
add eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x40568f
mov eax, 0x8007000e
jmp 0x405a36
lea eax, [ebp - 0x690]
push eax
push edi
lea eax, [ebp - 0x698]
push eax
push 0x34
call esi
test eax, eax
je 0x405a2a
mov esi, edi
cmp word [edi], bx
je 0x4056dc
lea eax, [ebp - 0x688]
push eax
push 0x10
push esi
lea ecx, [ebp - 0x6cc]
call fcn.0040506e
mov ebx, dword [ebp - 0x688]
test ebx, ebx
je 0x4056e2
add esi, 0xa
xor eax, eax
cmp word [esi], ax
jne 0x4056b1
jmp 0x4056e2
mov ebx, dword [ebp - 0x688]
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
jne 0x40577c
xor eax, eax
jmp 0x405a36
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
mov esi, 0x3ff
xor edi, edi
mov ecx, eax
and ecx, esi
inc edi
lea edx, [esi + 0xa]
cmp cx, di
je 0x405725
cmp cx, 0xd
jne 0x405727
mov eax, edx
mov word [ebp - 0xc], ax
and eax, esi
or eax, 0x400
mov word [ebp - 8], dx
mov word [ebp - 0xa], ax
xor eax, eax
mov esi, eax
push 0xa
push 6
lea eax, [ebp - 0x24]
push eax
movzx eax, word [ebp + esi*2 - 0xc]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itow_s]
add esp, 0x10
lea eax, [ebp - 0x688]
lea ecx, [ebp - 0x6cc]
push eax
push 0xa
lea eax, [ebp - 0x24]
push eax
call fcn.0040506e
cmp dword [ebp - 0x688], 0
je 0x4056fb
inc esi
cmp esi, 3
jb 0x40573e
lea eax, [ebp - 0x688]
push eax
push 0xa
push 0x401240
lea ecx, [ebp - 0x6cc]
call fcn.0040506e
mov ebx, dword [ebp - 0x688]
test ebx, ebx
je 0x4056fb
push 0xffffffffffffffff
lea eax, [ebp - 0x434]
mov esi, 0x104
push eax
lea eax, [ebp - 0x22c]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
test eax, eax
jne 0x405a23
push 0xffffffffffffffff
push 0x40124c
lea eax, [ebp - 0x22c]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
test eax, eax
jne 0x405a23
lea eax, [ebp - 0x684]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x405820
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x405a36
movzx eax, ax
or eax, 0x80070000
jmp 0x405a36
lea esi, [ebp - 0x434]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x40582b
sub esi, ecx
sar esi, 1
jmp 0x4059be
test byte [ebp - 0x684], 0x10
je 0x4059be
mov ecx, 0x401250
lea eax, [ebp - 0x658]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40587d
test dx, dx
je 0x405879
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40587d
add eax, 4
add ecx, 4
test dx, dx
jne 0x405857
xor eax, eax
jmp 0x405884
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
je 0x4059be
mov ecx, 0x401254
lea eax, [ebp - 0x658]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4058c0
test dx, dx
je 0x4058b9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4058c0
add eax, 4
add ecx, 4
test dx, dx
jne 0x405897
xor ecx, ecx
xor eax, eax
inc ecx
jmp 0x4058c7
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
je 0x4059be
mov eax, dword [ebp - 0x6b0]
test eax, eax
je 0x4058fd
lea ecx, [ebp - 0x68c]
push ecx
lea ecx, [ebp - 0x658]
push ecx
call eax
test eax, eax
je 0x4059be
xor ecx, ecx
cmp word [eax], cx
je 0x405929
jmp 0x4059be
push ecx
lea eax, [ebp - 0x6ac]
push eax
lea eax, [ebp - 0x68c]
push eax
lea eax, [ebp - 0x658]
push 0x40125c
push eax
call fcn.00405b0a
add esp, 0x14
cmp eax, 0xffffffff
je 0x4059be
lea eax, [esi + esi]
cmp eax, 0x208
jae 0x405a47
xor ecx, ecx
mov word [ebp + eax - 0x22c], cx
lea eax, [ebp - 0x658]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x22c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
test eax, eax
jne 0x4059be
push 0xffffffffffffffff
push 0x4011ac
lea eax, [ebp - 0x22c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
test eax, eax
jne 0x4059be
push 0xffffffffffffffff
push dword [ebp - 0x69c]
lea eax, [ebp - 0x22c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
test eax, eax
jne 0x4059be
push dword [ebp - 0x6a0]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ecx, eax
test ecx, ecx
jne 0x4059df
lea eax, [ebp - 0x684]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40583f
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
jmp 0x405a36
mov eax, dword [ebp - 0x6a4]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x6a8]
test ecx, ecx
je 0x4059fb
mov ax, word [ebp - 0x68c]
mov word [ecx], ax
cmp dword [ebp - 0x694], 0
je 0x405a1d
lea eax, [ebp - 0x22c]
push eax
push dword [ebp + 0x1c]
push dword [ebp - 0x694]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
xor eax, eax
mov ebx, eax
jmp 0x4059d4
mov eax, 0x80070003
jmp 0x405a36
mov eax, 0x80004005
jmp 0x405a36
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403865
leave
ret 0x20
call fcn.00403fa6
int3