Function at 0x40b660
Capabilities:
Check if file exists
Enumerate files on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x7d3537
mov eax, dword fs:[0]
push eax
sub esp, 0x818
mov eax, dword [0x89b044]
xor eax, esp
mov dword [esp + 0x814], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x89b044]
xor eax, esp
push eax
lea eax, [esp + 0x82c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x83c]
xor ebp, ebp
mov edi, edx
mov dword [esp + 0x14], ebp
mov eax, dword [edi]
mov ebx, ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x58], edi
cmp dword [eax - 0xc], ebp
jne 0x40b6d9
push 0x830150
call fcn.004068d0
mov dword [esp + 0x834], ebp
mov dword [esp + 0x14], 1
jmp 0x40bd09
push 0x208
lea edx, [esp + 0x622]
xor ecx, ecx
push ebp
push edx
mov dword [esp + 0x48], ebp
mov word [esp + 0x628], cx
call fcn.007202b0
push 0x208
lea ecx, [esp + 0x422]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x428], ax
call fcn.007202b0
add esp, 0x18
lea ecx, [esp + 0x20]
call fcn.00405e90
mov dword [esp + 0x834], 1
lea ecx, [esp + 0x2c]
call fcn.00405e90
mov byte [esp + 0x834], 2
lea ecx, [esp + 0x40]
call fcn.00405e90
mov byte [esp + 0x834], 3
lea ecx, [esp + 0x24]
call fcn.00405e90
mov byte [esp + 0x834], 4
lea ecx, [esp + 0x1c]
call fcn.00405e90
mov byte [esp + 0x834], 5
lea ecx, [esp + 0x18]
call fcn.00405e90
mov byte [esp + 0x834], 6
lea ecx, [esp + 0x28]
call fcn.00405e90
mov byte [esp + 0x834], 7
push esi
lea edx, [esp + 0x2c]
push str..__s._
push edx
call fcn.0040e430
add esp, 0xc
push ebp
push ebp
lea ecx, [esp + 0xb4]
call fcn.0040e810
mov byte [esp + 0x834], 8
mov eax, dword [esp + 0x28]
push ebp
push eax
lea ecx, [esp + 0xb4]
call fcn.0040e8b0
push str..
lea ecx, [esp + 0x34]
push edi
push ecx
call fcn.00403a70
mov byte [esp + 0x840], 9
push 0x24c
lea edx, [esp + 0x1d4]
push ebp
push edx
mov dword [esp + 0x1d8], ebp
call fcn.007202b0
mov ecx, dword [esp + 0x48]
add esp, 0x18
lea eax, [esp + 0x1c0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x38], eax
cmp eax, 0xffffffff
je 0x40bc5c
jmp 0x40b830
push 0x104
lea edx, [esp + 0x1f0]
push edx
lea eax, [esp + 0x418]
push eax
call fcn.0072c591
lea ecx, [esp + 0x41c]
push 0x2e
push ecx
call fcn.0072b303
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x40bc3f
push str..lnk
push ebp
call fcn.00723690
add esp, 8
test eax, eax
jne 0x40bc3f
xor edx, edx
mov dword [esp + 0x78], eax
mov ebx, 7
lea eax, [esp + 0x410]
mov word [esp + 0x68], dx
mov dword [esp + 0x7c], ebx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b8a0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x414]
push eax
lea ecx, [esp + 0x6c]
call fcn.00404850
mov byte [esp + 0x834], 0xa
push 0
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x88]
push edx
call fcn.0060d000
add esp, 0xc
mov byte [esp + 0x834], 0xb
mov edi, 8
cmp dword [eax + 0x18], edi
jb 0x40b8f7
mov edx, dword [eax + 4]
jmp 0x40b8fa
lea edx, [eax + 4]
test edx, edx
jne 0x40b902
xor eax, eax
jmp 0x40b916
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b907
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x2c]
call fcn.00406740
mov byte [esp + 0x834], 0xa
cmp dword [esp + 0x98], edi
jb 0x40b942
mov eax, dword [esp + 0x84]
push eax
call fcn.00704960
add esp, 4
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x94], esi
mov word [esp + 0x84], cx
mov byte [esp + 0x834], 9
cmp dword [esp + 0x7c], edi
jb 0x40b977
mov edx, dword [esp + 0x68]
push edx
call fcn.00704960
add esp, 4
mov ecx, dword [esp + 0x24]
push esi
push ecx
lea edx, [esp + 0xa4]
xor eax, eax
push edx
lea ecx, [esp + 0xb8]
mov dword [esp + 0x88], ebx
mov dword [esp + 0x84], esi
mov word [esp + 0x74], ax
call fcn.0040e940
mov byte [esp + 0x834], 0xc
cmp dword [eax + 8], esi
jle 0x40b9b8
mov eax, dword [eax + 4]
mov esi, dword [eax]
mov byte [esp + 0x834], 9
lea ecx, [esp + 0x9c]
call fcn.0040e2c0
test esi, esi
je 0x40bc3b
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx]
lea edx, [esp + 0x410]
push edx
push eax
lea eax, [esp + 0x624]
push 0x82fdd0
push eax
call fcn.00417ff0
push str..lnk
push ebp
call fcn.00723690
add esp, 0x18
test eax, eax
jne 0x40bc3b
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x628]
push eax
call fcn.00616a80
add esp, 0x10
test eax, eax
je 0x40bc3b
mov ecx, dword [esp + 0x20]
push 1
push ecx
call fcn.00612ad0
add esp, 8
test eax, eax
je 0x40bc3b
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x4c], esp
push edx
call fcn.00405d50
mov byte [esp + 0x838], 0xe
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x83c], 9
call fcn.0060d920
add esp, 8
mov byte [esp + 0x834], 0xf
push eax
lea ecx, [esp + 0x20]
call fcn.00404210
mov byte [esp + 0x834], 9
lea ecx, [esp + 0x44]
call fcn.00405ef0
push 0x82fddc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x68]
push edx
call fcn.00403a70
add esp, 0xc
mov byte [esp + 0x834], 0x10
push eax
lea ecx, [esp + 0x1c]
call fcn.00404210
mov byte [esp + 0x834], 9
lea ecx, [esp + 0x60]
call fcn.00405ef0
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40bb6e
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x4c], esp
push edx
call fcn.00405d50
mov byte [esp + 0x838], 0x11
lea eax, [esp + 0x58]
push eax
mov byte [esp + 0x83c], 9
call fcn.0060d920
add esp, 8
mov byte [esp + 0x834], 0x12
push eax
lea ecx, [esp + 0x20]
call fcn.00404210
mov byte [esp + 0x834], 9
lea ecx, [esp + 0x54]
call fcn.00405ef0
push 0x82fddc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x64]
push edx
call fcn.00403a70
add esp, 0xc
mov byte [esp + 0x834], 0x13
push eax
lea ecx, [esp + 0x1c]
call fcn.00404210
mov byte [esp + 0x834], 9
lea ecx, [esp + 0x5c]
call fcn.00405ef0
mov eax, dword [esp + 0x18]
push 1
push eax
call fcn.00612ad0
add esp, 8
test eax, eax
je 0x40bbcd
lea ecx, [esp + 0x50]
push 1
push ecx
call fcn.004086d0
mov esi, eax
mov byte [esp + 0x83c], 0x14
or dword [esp + 0x1c], 2
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x58]
push eax
call fcn.00618340
mov dword [esp + 0x844], 0x15
or dword [esp + 0x24], 4
push esi
push eax
call fcn.0040caa0
add esp, 0x18
test al, al
je 0x40bbcd
mov bl, 1
jmp 0x40bbcf
xor bl, bl
mov dword [esp + 0x834], 0x14
test byte [esp + 0x14], 4
je 0x40bbef
and dword [esp + 0x14], 0xfffffffb
lea ecx, [esp + 0x4c]
call fcn.00405ef0
mov dword [esp + 0x834], 9
test byte [esp + 0x14], 2
je 0x40bc0f
and dword [esp + 0x14], 0xfffffffd
lea ecx, [esp + 0x50]
call fcn.00405ef0
test bl, bl
mov ebx, dword [esp + 0x34]
je 0x40bc3f
mov dword [esp + 0x3c], 1
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x3c], 0
je 0x40bc5c
lea ecx, [esp + 0x61c]
push ecx
jmp 0x40bc61
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x1c0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40b830
jmp 0x40bc1f
push 0x830150
mov ecx, ebx
call fcn.004068d0
or dword [esp + 0x14], 1
mov byte [esp + 0x834], 8
lea ecx, [esp + 0x30]
call fcn.00405ef0
mov byte [esp + 0x834], 7
lea ecx, [esp + 0xac]
call fcn.0040bd40
mov byte [esp + 0x834], 6
lea ecx, [esp + 0x28]
call fcn.00405ef0
mov byte [esp + 0x834], 5
lea ecx, [esp + 0x18]
call fcn.00405ef0
mov byte [esp + 0x834], 4
lea ecx, [esp + 0x1c]
call fcn.00405ef0
mov byte [esp + 0x834], 3
lea ecx, [esp + 0x24]
call fcn.00405ef0
mov byte [esp + 0x834], 2
lea ecx, [esp + 0x40]
call fcn.00405ef0
mov byte [esp + 0x834], 1
lea ecx, [esp + 0x2c]
call fcn.00405ef0
mov byte [esp + 0x834], 0
lea ecx, [esp + 0x20]
call fcn.00405ef0
mov eax, ebx
mov ecx, dword [esp + 0x82c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x814]
xor ecx, esp
call fcn.0071fe0b
add esp, 0x824
ret