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

Disassembly:
sub esp, 0x4f0
mov eax, dword [0x4165ec]
mov ecx, dword [0x4165e0]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x58], eax
mov eax, dword [0x41396c]
mov dword [esp + 0x5c], ecx
lea edx, [esp + 0x2e8]
mov ecx, 0xa
lea esi, [esp + 0x40]
lea edi, [esp + 0x80]
mov dword [esp + 0x40], 0x23
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], 0x104
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14], eax
mov eax, dword [0x415e94]
xor esi, esi
cmp eax, 1
mov dword [esp + 0x78], 0xffff0000
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov edi, 0xffff0001
jne 0x40d50b
cmp dword [0x4161f4], 4
jne 0x40d50b
mov cx, word [0x413980]
mov word [esp + 0x68], cx
jmp 0x40d520
mov dx, word [0x413984]
mov al, byte [0x413986]
mov word [esp + 0x68], dx
mov byte [esp + 0x6a], al
mov ecx, dword [esp + 0x504]
lea edx, [esp + 0xa8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esp + 0xa8]
push eax
call ebx
cmp byte [esp + eax + 0xa7], 0x5c
jne 0x40d562
lea ecx, [esp + 0xa8]
push ecx
call ebx
mov byte [esp + eax + 0xa7], 0
lea edx, [esp + 0x68]
lea eax, [esp + 0xa8]
push edx
push eax
lea ecx, [esp + 0x404]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x2bc]
lea eax, [esp + 0x3fc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40d83d
mov eax, dword [esp + 0x14]
push esi
push eax
lea ecx, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x20], esi
call fcn.0040cf70
mov eax, dword [esp + 0x20]
add esp, 0x10
cmp eax, esi
jne 0x40d5de
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
mov edx, dword [esp + 0x14]
mov dword [esp + 0x78], edx
cmp dword [esp + 0x2bc], 0x10
jne 0x40d619
cmp byte [esp + 0x2e8], 0x2e
je 0x40d619
mov ecx, dword [0x415e84]
lea eax, [esp + 0x78]
push eax
push 0
push 0x1100
push ecx
mov dword [esp + 0x8c], edi
call ebp
mov edi, eax
inc esi
lea edx, [esp + 0x2bc]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40d5e6
test esi, esi
je 0x40d65a
mov eax, dword [esp + 0x14]
push esi
push edi
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.0040cf70
mov eax, dword [esp + 0x20]
add esp, 0x10
lea edx, [esp + 0xa8]
add eax, 0x10
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x415e84]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], ecx
push edx
push 0
push 0x110c
push eax
call ebp
mov eax, dword [esp + 0x3c]
mov edx, dword [0x415e84]
or eax, 0x40000000
lea ecx, [esp + 0x18]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
or al, 0x44
push ecx
push 0
and al, 0xfe
push 0x110d
push edx
mov dword [esp + 0x48], esi
mov dword [esp + 0x28], eax
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x10]
cmp dword [esi + 0xc], esi
je 0x40d82c
mov ecx, 0x44
lea edi, [esp + 0x1ac]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x1b8]
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.0040d000
mov esi, dword [esp + 0x1b4]
add esp, 8
lea edx, [esp + 0x1bc]
lea eax, [esp + 0xa8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x1b4]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x1b4], eax
je 0x40d81f
mov eax, dword [0x415e84]
lea edx, [esp + 0x40]
push edx
push 0
push 0x110c
push eax
mov dword [esp + 0x54], esi
call ebp
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x68]
push ecx
lea eax, [esp + 0xac]
push edx
push eax
lea ecx, [esp + 0x408]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea edx, [esp + 0x2bc]
lea eax, [esp + 0x3fc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d81f
xor ebx, ebx
mov dword [esp + 0x78], esi
cmp dword [esp + 0x2bc], 0x10
jne 0x40d795
cmp byte [esp + 0x2e8], 0x2e
je 0x40d795
mov dword [esp + 0x7c], esi
inc ebx
lea ecx, [esp + 0x2bc]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40d77c
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [0x415e84]
lea edx, [esp + 0x18]
push edx
push 0
push 0x110c
push eax
mov dword [esp + 0x2c], esi
call ebp
mov eax, dword [esp + 0x18]
mov edx, dword [0x415e84]
lea ecx, [esp + 0x18]
or al, 0x40
push ecx
push 0
and al, 0xfe
push 0x110d
push edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x28], eax
call ebp
mov eax, dword [0x415e84]
push esi
push 2
push 0x110a
push eax
call ebp
mov esi, eax
mov eax, dword [esp + 0x1b4]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x1b4], eax
jne 0x40d715
mov esi, dword [esp + 0x10]
cmp dword [esi + 0xc], esi
jne 0x40d6bc
lea edx, [esp + 0x10]
push 0
push edx
call fcn.0040d000
add esp, 8
xor esi, esi
mov eax, dword [0x41396c]
mov ecx, dword [0x415e84]
push eax
push esi
push 0x1113
push ecx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret