Function at 0x401780
Capabilities:
Enumerate files on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40b35d
push eax
mov eax, 0x100c4
mov dword fs:[0], esp
call fcn.004048d0
mov eax, dword [0x40e0d4]
push ebx
push 8
xor ebx, ebx
push str.main.pak
lea ecx, [esp + 0x24]
mov dword [esp + 0x100cc], eax
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.00401570
mov ecx, dword [0x40e7d0]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x100d4], ebx
call fcn.004035f0
mov byte [esp + 4], al
cmp dword [esp + 0x34], 0x10
mov dword [esp + 0x100d0], 0xffffffff
jb 0x401808
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00403dc1
add esp, 4
cmp byte [esp + 4], bl
je 0x401d33
push esi
push edi
push str.main.pak
push str._s___extract__n
call fcn.00404899
push 0x40c1bc
push str._popunpack.list
call fcn.00403dae
push 0x140
mov dword [esp + 0x28], eax
call fcn.00403ba9
mov esi, eax
add esp, 0x14
mov dword [esp + 0x20], esi
call fcn.00401000
test eax, eax
push esi
push 0x40c1a8
je 0x40186d
mov edx, dword [0x40e7c4]
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov edi, eax
mov dword [esp + 0x10], edi
jmp 0x401879
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0x10], eax
mov edi, eax
push ebp
lea ebp, [esi + 0x2c]
mov dword [esp + 0x20], ebp
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x18]
push ecx
push ebp
push str._s____d_n
push edx
call fcn.00404867
push ebp
push str.main.pak
call fcn.0040af7a
add esp, 0x18
test eax, eax
je 0x401cc9
mov eax, 0x40c198
mov edi, ebp
call fcn.004010a0
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x1c], edi
je 0x401cb8
mov eax, ebp
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4018e3
sub eax, esi
push eax
push ebp
lea ecx, [esp + 0xa0]
call fcn.00401570
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0xa4]
mov dword [esp + 0x100e8], 1
mov byte [esp + 0x1c], 0x5c
call fcn.00401100
push 0xb
push str._popunpack_
lea ecx, [esp + 0xbc]
mov esi, eax
mov dword [esp + 0xd4], 0xf
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
call fcn.00401570
push ebx
push 0x40c188
lea ecx, [esp + 0x84]
mov byte [esp + 0x100e4], 2
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], ebx
mov byte [esp + 0x88], bl
call fcn.00401570
cmp esi, ebx
mov byte [esp + 0x100dc], 3
jl 0x401a50
lea ebp, [esi + 1]
push ebp
push ebx
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0xa4]
call fcn.004016a0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xc0]
mov byte [esp + 0x100e8], 4
call fcn.00401390
cmp dword [esp + 0x40], 0x10
mov byte [esp + 0x100dc], 3
jb 0x4019da
mov edx, dword [esp + 0x2c]
push edx
call fcn.00403dc1
add esp, 4
mov eax, dword [esp + 0xac]
sub eax, esi
inc eax
push eax
push ebp
lea ecx, [esp + 0x68]
push ecx
mov edi, 0xf
lea ecx, [esp + 0xa4]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], bl
call fcn.004016a0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xa4]
mov byte [esp + 0x100e8], 5
call fcn.00401480
cmp dword [esp + 0x78], 0x10
mov byte [esp + 0x100dc], 3
jb 0x401a3c
mov edx, dword [esp + 0x64]
push edx
call fcn.00403dc1
add esp, 4
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x78], edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xb8]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.004016e0
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x88]
mov byte [esp + 0x100e8], 6
call fcn.00401480
mov eax, dword [esp + 0x5c]
mov esi, 0x10
cmp eax, esi
mov byte [esp + 0x100dc], 3
jb 0x401aa7
mov eax, dword [esp + 0x48]
push eax
call fcn.00403dc1
add esp, 4
cmp dword [esp + 0x94], esi
mov eax, dword [esp + 0x80]
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
jae 0x401ace
lea eax, [esp + 0x80]
push 0x40c184
push eax
call fcn.00403dae
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x401b32
mov eax, dword [esp + 0xcc]
mov esi, 0x10
cmp eax, esi
mov eax, dword [esp + 0xb8]
jae 0x401b00
lea eax, [esp + 0xb8]
push eax
call fcn.00403b30
mov eax, dword [esp + 0x98]
add esp, 4
cmp eax, esi
mov eax, dword [esp + 0x80]
jae 0x401b22
lea eax, [esp + 0x80]
push 0x40c184
push eax
call fcn.00403dae
add esp, 8
mov esi, eax
cmp dword [esp + 0x94], 0x10
mov eax, dword [esp + 0x80]
jae 0x401b4a
lea eax, [esp + 0x80]
push eax
push 0x40c180
call fcn.00404899
add esp, 8
cmp esi, ebx
je 0x401be8
call fcn.00401000
test eax, eax
je 0x401b79
mov ecx, dword [0x40e7c4]
mov ecx, dword [ecx]
mov edx, dword [ecx]
push edi
call dword [edx + 0x28]
jmp 0x401b82
mov eax, dword [edi + 8]
mov eax, dword [eax + 0xc]
and eax, 0x10
cmp eax, ebx
jne 0x401bdf
call fcn.00401000
test eax, eax
je 0x401bae
mov ecx, dword [0x40e7c4]
mov ecx, dword [ecx]
mov edx, dword [ecx]
push edi
push 0x10000
push 1
lea eax, [esp + 0xdc]
push eax
call dword [edx + 0x14]
jmp 0x401bc9
mov ecx, dword [edi + 8]
push ecx
push 0x10000
lea edx, [esp + 0xd8]
push 1
push edx
call fcn.00403e1c
add esp, 0x10
push esi
push eax
lea eax, [esp + 0xd8]
push 1
push eax
call fcn.00404760
add esp, 0x10
jmp 0x401b60
push esi
call fcn.00403dc6
add esp, 4
call fcn.00401000
test eax, eax
je 0x401c01
mov ecx, dword [0x40e7c4]
mov ecx, dword [ecx]
mov edx, dword [ecx]
push edi
call dword [edx + 8]
jmp 0x401c13
mov eax, dword [edi + 8]
push eax
call fcn.00403dc6
push edi
call fcn.00403dc1
add esp, 8
mov eax, dword [esp + 0x94]
mov edi, 0x10
cmp eax, edi
jb 0x401c33
mov ecx, dword [esp + 0x80]
push ecx
call fcn.00403dc1
add esp, 4
cmp dword [esp + 0xcc], edi
mov esi, 0xf
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
jb 0x401c66
mov edx, dword [esp + 0xb8]
push edx
call fcn.00403dc1
add esp, 4
cmp dword [esp + 0xb0], edi
mov dword [esp + 0xcc], esi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
mov dword [esp + 0x100dc], 0xffffffff
jb 0x401c9f
mov eax, dword [esp + 0x9c]
push eax
call fcn.00403dc1
add esp, 4
mov dword [esp + 0xb0], esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
push 0x40c17c
call fcn.00404899
mov edi, dword [esp + 0x18]
add esp, 4
call fcn.00401000
test eax, eax
push esi
push edi
je 0x401ce3
mov ecx, dword [0x40e7c4]
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0x30]
jmp 0x401ce9
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, ebx
jne 0x401881
call fcn.00401000
test eax, eax
pop ebp
push edi
je 0x401d0a
mov eax, dword [0x40e7c4]
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x34]
jmp 0x401d10
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call fcn.00404728
mov eax, dword [esp + 0x18]
push eax
call fcn.00403dc6
push str.Done.
call fcn.00404899
add esp, 0xc
pop edi
xor eax, eax
pop esi
jmp 0x401d48
push str.main.pak
push str.couldnt_find__s_nAbort.
call fcn.00404899
add esp, 8
or eax, 0xffffffff
mov ecx, dword [esp + 0x100c8]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x100c4]
pop ebx
call fcn.00403d76
add esp, 0x100d0
ret