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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6d4
mov eax, dword [0x410014]
xor eax, esp
mov dword [esp + 0x6d0], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], 0x424ea0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0x424e9c
mov dword [esp + 0x18], 0x60
push ebx
push esi
push edi
test ecx, ecx
je 0x409f59
cmp word [ecx], 0
je 0x409f59
test edx, edx
je 0x409f59
cmp word [edx], 0
je 0x409f59
push 0xffffffffffffffff
push ecx
lea eax, [esp + 0x4d8]
mov dword [0x424e9c], 0
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
test eax, eax
jne 0x409f3f
lea ecx, [esp + 0x4d0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409992
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x4ce], 0x5c
je 0x4099d1
push 0xffffffffffffffff
push 0x401910
lea eax, [esp + 0x4d8]
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 0x409f3f
lea eax, [esp + 0x4d0]
mov dword [esp + 0x10], 0x80070002
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x2b0], eax
mov dword [esp + 0x2b4], eax
mov dword [esp + 0x2b8], eax
lea eax, [esp + 0x2b0]
push 6
push eax
push 0x401914
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x409a6c
cmp eax, 6
jae 0x409a6c
lea eax, [esp + 0x10]
push eax
push 0xa
lea eax, [esp + 0x2b8]
push eax
lea ecx, [esp + 0x48]
call fcn.00409f80
cmp dword [esp + 0x10], 0
je 0x409be0
mov eax, dword [0x424c44]
mov edi, dword [sym.imp.KERNEL32.dll_DecodePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x409aac
push 0x401924
call ebx
test eax, eax
je 0x409bf7
push 0x401940
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x424c44], eax
jmp 0x409ab1
push eax
call edi
mov esi, eax
test esi, esi
je 0x409bf7
push 0
push 0
push 0x401960
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x409add
push eax
push eax
push pe_nt_image_headers32
call esi
test eax, eax
je 0x409f3f
mov eax, dword [0x424c40]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
test eax, eax
jne 0x409b21
push 0x401924
call ebx
test eax, eax
je 0x409c93
push 0x401984
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x424c40], eax
jmp 0x409b26
push eax
call edi
mov edi, eax
test edi, edi
je 0x409c93
lea eax, [esp + 0x18]
push eax
push 0
lea eax, [esp + 0x24]
push eax
push 0x34
call edi
test eax, eax
je 0x409f3f
mov eax, dword [esp + 0x18]
lea esi, [eax + eax]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x409b7d
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
push ebx
lea eax, [esp + 0x24]
push eax
push 0x34
call edi
test eax, eax
je 0x409f3f
cmp word [ebx], 0
mov esi, ebx
je 0x409bc4
lea esp, [esp]
lea eax, [esp + 0x10]
push eax
push 0x10
push esi
lea ecx, [esp + 0x48]
call fcn.00409f80
mov edi, dword [esp + 0x10]
test edi, edi
je 0x409bc8
add esi, 0xa
cmp word [esi], 0
jne 0x409ba0
jmp 0x409bc8
mov edi, dword [esp + 0x10]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
jne 0x409c93
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
cmp cx, 1
je 0x409c14
cmp cx, 0xd
jne 0x409c19
mov eax, 0x409
mov edi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itow_s]
mov word [esp + 0x2a8], ax
and eax, 0x3ff
or eax, 0x400
xor esi, esi
mov word [esp + 0x2aa], ax
mov eax, 0x409
mov word [esp + 0x2ac], ax
jmp 0x409c50
push 0xa
push 6
lea eax, [esp + 0x2c4]
push eax
movzx eax, word [esp + esi*2 + 0x2b4]
push eax
call edi
add esp, 0x10
lea eax, [esp + 0x10]
lea ecx, [esp + 0x3c]
push eax
push 0xa
lea eax, [esp + 0x2c4]
push eax
call fcn.00409f80
cmp dword [esp + 0x10], 0
je 0x409be0
inc esi
cmp esi, 3
jb 0x409c50
lea eax, [esp + 0x10]
push eax
push 0xa
push 0x4019a4
lea ecx, [esp + 0x48]
call fcn.00409f80
cmp dword [esp + 0x10], 0
je 0x409be0
push 0xffffffffffffffff
lea eax, [esp + 0x4d4]
push eax
lea eax, [esp + 0x2d0]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
test eax, eax
jne 0x409f25
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
lea eax, [esp + 0x2c8]
push 0xffffffffffffffff
push 0x4019b0
push 0x104
push eax
call ebx
add esp, 0x10
test eax, eax
jne 0x409f25
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x409d47
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409f5e
movzx eax, ax
or eax, 0x80070000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
lea esi, [esp + 0x4d0]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x409d51
lea eax, [esp + 0x58]
sub esi, ecx
push eax
push edi
sar esi, 1
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x409ecb
test byte [esp + 0x58], 0x10
je 0x409eb7
mov ecx, 0x4011e4
lea eax, [esp + 0x84]
jmp 0x409d90
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409db6
test dx, dx
je 0x409db2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409db6
add eax, 4
add ecx, 4
test dx, dx
jne 0x409d90
xor eax, eax
jmp 0x409dbb
sbb eax, eax
or eax, 1
test eax, eax
je 0x409eb7
mov ecx, 0x4019b4
lea eax, [esp + 0x84]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409df6
test dx, dx
je 0x409df2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409df6
add eax, 4
add ecx, 4
test dx, dx
jne 0x409dd0
xor eax, eax
jmp 0x409dfb
sbb eax, eax
or eax, 1
test eax, eax
je 0x409eb7
push 1
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x90]
push 0x4019bc
push eax
call fcn.0040a270
add esp, 0x14
cmp eax, 0xffffffff
je 0x409eb7
lea eax, [esi + esi]
cmp eax, 0x208
jae 0x409f73
xor ecx, ecx
mov word [esp + eax + 0x2c8], cx
lea eax, [esp + 0x84]
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x2d0]
push 0x104
push eax
call ebx
add esp, 0x10
test eax, eax
jne 0x409eb7
push 0xffffffffffffffff
push 0x401910
lea eax, [esp + 0x2d0]
push 0x104
push eax
call ebx
add esp, 0x10
test eax, eax
jne 0x409eb7
push 0xffffffffffffffff
push dword [esp + 0x24]
lea eax, [esp + 0x2d0]
push 0x104
push eax
call ebx
add esp, 0x10
test eax, eax
jne 0x409eb7
push dword [esp + 0x24]
push eax
lea eax, [esp + 0x2d0]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ecx, eax
test ecx, ecx
jne 0x409eed
lea eax, [esp + 0x58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409d74
mov esi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
mov dword [eax], ecx
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x409f03
mov ax, word [esp + 0x14]
mov word [ecx], ax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x409f21
lea ecx, [esp + 0x2c8]
push ecx
push dword [esp + 0x38]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
xor esi, esi
jmp 0x409ecf
mov eax, 0x80070003
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d0]
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
mov eax, 0x80070057
mov ecx, dword [esp + 0x6dc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040dea1
mov esp, ebp
pop ebp
ret
call fcn.0040e225
int3