Function at 0x10031630
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x191c
call fcn.1003aec0
mov eax, dword [0x1003f6e4]
xor eax, esp
mov dword [esp + 0x1918], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push edx
push ecx
mov word [esp + 0x288], ax
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0
mov ebx, eax
push 0x184
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test esi, esi
je 0x100317a8
cmp word [esi], 0
je 0x100317a8
push 0x103
push esi
lea eax, [esp + 0x288]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
lea ecx, [esp + 0x280]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100316b5
push 0
push 0
sub ecx, edx
lea eax, [esp + 0x1518]
push 0x208
push eax
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [esp + 0x294]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x8e8]
push eax
lea eax, [esp + 0x1514]
push eax
call dword [sym.imp.USER32.dll_CharToOemA]
lea ecx, [esp + 0x8e8]
lea edx, [ecx + 1]
jmp 0x10031710
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031710
push 0x104
sub ecx, edx
lea eax, [esp + 0xaf4]
push eax
lea eax, [ecx + 1]
push eax
lea eax, [esp + 0x8f4]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 0x280]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031746
sub ecx, edx
sar ecx, 1
lea eax, [ecx - 1]
movzx eax, ax
add eax, eax
cmp word [esp + eax + 0x280], 0x5c
jne 0x1003177d
cmp eax, 0x208
jae 0x10031a3c
xor ecx, ecx
mov word [esp + eax + 0x280], cx
test edi, edi
je 0x100317dc
cmp word [edi], 0
je 0x100317dc
push 0x12b
push edi
lea eax, [esp + 0x490]
push 0x12c
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
add esp, 0x10
jmp 0x10031838
lea eax, [esp + 0x280]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x100316ab
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1918]
xor ecx, esp
call fcn.1003a750
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
push 0x12c
mov word [esp + 0x48c], ax
lea eax, [esp + 0x48c]
push eax
push 0xae04
push dword [0x10041578]
call dword [sym.imp.USER32.dll_LoadStringW]
cmp word [esp + 0x488], 0
jne 0x10031838
mov esi, dword [0x1004138c]
lea eax, [esp + 0x488]
push 0x12c
push eax
push 0xae04
mov ecx, esi
call dword [0x10042350]
call esi
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [esp + 0x488]
push 0x100027c4
push eax
call dword [sym.imp.msvcrt.dll_wcstok]
add esp, 8
test eax, eax
je 0x10031a20
mov edi, dword [ebp + 0x10]
lea esp, [esp]
push eax
lea eax, [esp + 0x284]
push eax
push 0x100021b4
lea eax, [esp + 0x1724]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_swprintf_s]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0xb08]
push eax
call dword [sym.imp.msvcrt.dll__wstat]
add esp, 0x1c
cmp eax, 0xffffffff
je 0x100317c3
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x171c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x100318c5
test esi, esi
je 0x100318c5
mov eax, 1
jmp 0x100318c7
xor eax, eax
test eax, eax
je 0x10031a01
nop
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x6e4]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
lea eax, [esp + 0x6ec]
push 0x100021ac
push eax
call dword [sym.imp.msvcrt.dll_wcspbrk]
add esp, 0x14
test eax, eax
jne 0x10031922
lea eax, [esp + 0x6e0]
push eax
lea eax, [esp + 0xcfc]
push 0x201
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0xc
jmp 0x1003197d
push 0x101
lea eax, [esp + 0x1104]
push eax
push 0x101
lea eax, [esp + 0x1314]
push eax
push 0
push 0
push 0
lea eax, [esp + 0x6fc]
push 0
push eax
call dword [sym.imp.msvcrt.dll__wsplitpath_s]
lea eax, [esp + 0x1124]
push eax
lea eax, [esp + 0x1330]
push eax
push 0x100021c0
lea eax, [esp + 0xd28]
push 0x201
push eax
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x38
test edi, edi
jne 0x100319a0
lea eax, [esp + 0xcf8]
push 0x100027b4
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
add esp, 8
test eax, eax
je 0x100319a0
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0xcf8]
push eax
call dword [sym.imp.USER32.dll_CharLowerW]
test dword [esp + 0x30], 0x116
jne 0x100319ce
lea eax, [esp + 0xcf8]
push eax
push 0
push 0x180
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0xaf4]
push eax
call dword [sym.imp.msvcrt.dll__wstat]
add esp, 8
cmp eax, 0xffffffff
je 0x100317c3
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100318d0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x100027c4
push 0
call dword [sym.imp.msvcrt.dll_wcstok]
add esp, 8
test eax, eax
jne 0x10031860
mov ecx, dword [esp + 0x1924]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1003a750
mov esp, ebp
pop ebp
ret 0xc
call fcn.1003a89a
int3