Function at 0x404250
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 [0x406014]
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 0x404870
xor ebx, ebx
cmp word [edx], bx
je 0x404870
test ecx, ecx
je 0x404870
cmp word [ecx], bx
je 0x404870
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 0x404869
lea ecx, [ebp - 0x434]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x4042ef
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x436], 0x5c
je 0x404329
push 0xffffffffffffffff
push 0x401144
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 0x404869
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 0x401148
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4043ca
cmp eax, 6
jae 0x4043ca
lea eax, [ebp - 0x688]
push eax
push 0xa
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x6cc]
call fcn.00403ead
cmp dword [ebp - 0x688], ebx
je 0x40453a
mov eax, dword [0x407bb8]
mov edi, dword [sym.imp.KERNEL32.dll_DecodePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40440a
push 0x401158
call ebx
test eax, eax
je 0x404541
push 0x401174
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x407bb8], eax
jmp 0x40440f
push eax
call edi
mov esi, eax
test esi, esi
je 0x404541
xor eax, eax
push eax
push eax
push 0x401194
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x40443b
push eax
push eax
push 0x100
call esi
test eax, eax
je 0x404869
xor eax, eax
mov dword [ebp - 0x690], eax
mov dword [ebp - 0x698], eax
mov eax, dword [0x407bbc]
test eax, eax
jne 0x40447d
push 0x401158
call ebx
test eax, eax
je 0x4045bb
push 0x4011b8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EncodePointer]
mov dword [0x407bbc], eax
jmp 0x404482
push eax
call edi
mov esi, eax
test esi, esi
je 0x4045bb
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 0x404869
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 0x4044ce
mov eax, 0x8007000e
jmp 0x404875
lea eax, [ebp - 0x690]
push eax
push edi
lea eax, [ebp - 0x698]
push eax
push 0x34
call esi
test eax, eax
je 0x404869
mov esi, edi
cmp word [edi], bx
je 0x40451b
lea eax, [ebp - 0x688]
push eax
push 0x10
push esi
lea ecx, [ebp - 0x6cc]
call fcn.00403ead
mov ebx, dword [ebp - 0x688]
test ebx, ebx
je 0x404521
add esi, 0xa
xor eax, eax
cmp word [esi], ax
jne 0x4044f0
jmp 0x404521
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 0x4045bb
xor eax, eax
jmp 0x404875
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 0x404564
cmp cx, 0xd
jne 0x404566
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.00403ead
cmp dword [ebp - 0x688], 0
je 0x40453a
inc esi
cmp esi, 3
jb 0x40457d
lea eax, [ebp - 0x688]
push eax
push 0xa
push 0x4011d8
lea ecx, [ebp - 0x6cc]
call fcn.00403ead
mov ebx, dword [ebp - 0x688]
test ebx, ebx
je 0x40453a
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 0x404862
push 0xffffffffffffffff
push 0x4011e4
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 0x404862
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 0x40465f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x404875
movzx eax, ax
or eax, 0x80070000
jmp 0x404875
lea esi, [ebp - 0x434]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x40466a
sub esi, ecx
sar esi, 1
jmp 0x4047fd
test byte [ebp - 0x684], 0x10
je 0x4047fd
mov ecx, 0x4011e8
lea eax, [ebp - 0x658]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4046bc
test dx, dx
je 0x4046b8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4046bc
add eax, 4
add ecx, 4
test dx, dx
jne 0x404696
xor eax, eax
jmp 0x4046c3
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
je 0x4047fd
mov ecx, 0x4011ec
lea eax, [ebp - 0x658]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4046ff
test dx, dx
je 0x4046f8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4046ff
add eax, 4
add ecx, 4
test dx, dx
jne 0x4046d6
xor ecx, ecx
xor eax, eax
inc ecx
jmp 0x404706
sbb eax, eax
xor ecx, ecx
inc ecx
or eax, ecx
test eax, eax
je 0x4047fd
mov eax, dword [ebp - 0x6b0]
test eax, eax
je 0x40473c
lea ecx, [ebp - 0x68c]
push ecx
lea ecx, [ebp - 0x658]
push ecx
call eax
test eax, eax
je 0x4047fd
xor ecx, ecx
cmp word [eax], cx
je 0x404768
jmp 0x4047fd
push ecx
lea eax, [ebp - 0x6ac]
push eax
lea eax, [ebp - 0x68c]
push eax
lea eax, [ebp - 0x658]
push 0x4011f4
push eax
call fcn.00404949
add esp, 0x14
cmp eax, 0xffffffff
je 0x4047fd
lea eax, [esi + esi]
cmp eax, 0x208
jae 0x404886
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 0x4047fd
push 0xffffffffffffffff
push 0x401144
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 0x4047fd
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 0x4047fd
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 0x40481e
lea eax, [ebp - 0x684]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40467e
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, ebx
jmp 0x404875
mov eax, dword [ebp - 0x6a4]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x6a8]
test ecx, ecx
je 0x40483a
mov ax, word [ebp - 0x68c]
mov word [ecx], ax
cmp dword [ebp - 0x694], 0
je 0x40485c
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 0x404813
mov eax, 0x80070003
jmp 0x404875
mov eax, 0x80004005
jmp 0x404875
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402813
leave
ret 0x20
call fcn.00402f46
int3