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

Disassembly:
push 0xffffffffffffffff
push 0x505e57
mov eax, dword fs:[0]
push eax
sub esp, 0xbfc
mov eax, dword [0x5375a0]
xor eax, esp
mov dword [esp + 0xbf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5375a0]
xor eax, esp
push eax
lea eax, [esp + 0xc10]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc28]
mov edi, dword [esp + 0xc20]
mov ebp, dword [esp + 0xc24]
mov esi, dword [esp + 0xc2c]
xor ebx, ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x38], esi
cmp eax, ebx
je 0x40d00b
cmp ebp, ebx
je 0x40d00b
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40cae6
sub eax, edx
sar eax, 1
je 0x40d00b
cmp esi, ebx
je 0x40d00b
push ebp
lea ecx, [esp + 0x98]
call fcn.00438c10
push 0x7fe
lea ecx, [esp + 0x412]
xor eax, eax
push ebx
mov dword [esp + 0xc20], ebx
push ecx
mov word [esp + 0x418], ax
call fcn.004cd250
add esp, 0xc
cmp byte [esp + 0x1b0], 0
lea eax, [esp + 0xa0]
jne 0x40cb4f
mov eax, dword [esp + 0x9c]
add eax, 4
push 0x542e00
push eax
call fcn.004c63ab
add esp, 8
test eax, eax
je 0x40cb81
push str._tstat_Fail
mov ecx, edi
call fcn.00402790
lea ecx, [esp + 0x94]
call fcn.00438c80
jmp 0x40d026
mov edx, 0x4000
test word [0x542e06], dx
jne 0x40cbac
push str._S_IFDIR_Fail
mov ecx, edi
call fcn.00402790
lea ecx, [esp + 0x94]
call fcn.00438c80
jmp 0x40d026
lea eax, [esp + 0x94]
call fcn.00439250
push eax
push str._s.
lea edx, [esp + 0x414]
call fcn.004023b0
add esp, 8
push 0x542bb0
lea eax, [esp + 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
jne 0x40cc06
push str.INVALID_HANDLE_VALUE__hHandle
mov ecx, edi
call fcn.00402790
lea ecx, [esp + 0x94]
call fcn.00438c80
jmp 0x40d026
mov byte [esp + 0x17], 1
xor ebp, ebp
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], fcn.004c61e0
mov dword [esp + 0x50], fcn.004c83aa
mov dword [esp + 0x54], fcn.004c6103
mov byte [esp + 0xc18], 1
lea ecx, [ecx]
mov ecx, 0x5192cc
mov eax, 0x542bdc
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40cc76
cmp dx, bx
je 0x40cc72
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40cc76
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40cc50
xor eax, eax
jmp 0x40cc7b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40ce88
mov ecx, 0x5192d0
mov eax, 0x542bdc
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ccb6
cmp dx, bx
je 0x40ccb2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ccb6
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40cc90
xor eax, eax
jmp 0x40ccbb
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40ce88
push 0x542bdc
lea ecx, [esp + 0x1c0]
call fcn.00438c10
mov byte [esp + 0xc18], 2
mov eax, dword [esp + 0x1c0]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004c9695
mov esi, eax
mov eax, dword [esp + 0x1c4]
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push ebx
push esi
mov dword [esp + 0x30], esi
call fcn.004cd250
mov ecx, dword [esp + 0x1cc]
add esp, 0xc
push ecx
lea eax, [esp + 0x1c0]
call fcn.00439250
push eax
inc ecx
push ecx
push esi
call fcn.004c873f
add esp, 0x10
lea edx, [esp + 0x24]
push edx
lea esi, [esp + 0x40]
call fcn.00406410
cmp ebp, ebx
jne 0x40ce74
lea eax, [esp + 0x58]
push eax
mov ebp, 1
call fcn.0044dba0
mov ecx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x2e8]
call fcn.00438c10
push 0x51924c
push 0x5192f4
lea edx, [esp + 0x2ec]
mov byte [esp + 0xc20], 4
call fcn.004392f0
push 0x542bdc
push 0x5192f4
lea edx, [esp + 0x2f4]
call fcn.004392f0
add esp, 0x10
push 0x51af78
lea ecx, [esp + 0x2e8]
mov dword [esp + 0x1c], ebx
call fcn.00435ed0
push eax
lea edx, [esp + 0x20]
push edx
call fcn.004c86ad
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebx
je 0x40cea2
push 2
push ebx
push eax
call fcn.004ca574
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
call fcn.004ca47c
mov ecx, dword [esp + 0x1c]
add esp, 4
push ebx
push ebx
push ecx
mov esi, eax
call fcn.004ca574
add esp, 0xc
push esi
call fcn.004c9695
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push esi
push ebp
mov edi, eax
push esi
push edi
call fcn.004ca21c
mov eax, dword [esp + 0x2c]
add esp, 0x14
push eax
call fcn.004c94fc
add esp, 4
push 0x542bdc
mov ebx, esi
lea eax, [esp + 0x5c]
call fcn.0044e630
push edi
test al, al
je 0x40ced2
call fcn.004c968a
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x78]
mov dword [edx], ecx
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
add esp, 4
lea ecx, [esp + 0x2e4]
call fcn.00438c80
lea ecx, [esp + 0x58]
call fcn.0044dc50
xor ebx, ebx
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.00438c80
mov edx, dword [esp + 0x2c]
push 0x542bb0
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40cc40
jmp 0x40cf0a
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x17], 0
call fcn.00438c80
lea ecx, [esp + 0x58]
call fcn.0044dc50
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.00438c80
jmp 0x40cf0a
call fcn.004c968a
add esp, 4
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x17], 0
call fcn.00438c80
lea ecx, [esp + 0x58]
call fcn.0044dc50
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.00438c80
xor ebx, ebx
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [esp + 0x17], 0
mov edi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
je 0x40cf7d
xor esi, esi
cmp ebp, ebx
jle 0x40cf7d
lea ebx, [ebx]
mov edx, dword [edi + esi*4]
cmp edx, ebx
je 0x40cf6f
mov eax, edx
lea ebx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cf40
sub eax, ebx
sar eax, 1
je 0x40cf6d
mov ecx, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x3c]
call fcn.0040c640
test al, al
je 0x40cf76
xor ebx, ebx
inc esi
cmp esi, ebp
jl 0x40cf30
jmp 0x40cf7d
mov byte [esp + 0x17], 0
xor ebx, ebx
xor esi, esi
cmp ebp, ebx
jle 0x40cf98
mov eax, dword [edi + esi*4]
cmp eax, ebx
je 0x40cf93
push eax
call fcn.004c968a
add esp, 4
inc esi
cmp esi, ebp
jl 0x40cf83
mov esi, dword [esp + 0x54]
cmp edi, ebx
je 0x40cfac
push edi
call esi
add esp, 4
xor edi, edi
mov dword [esp + 0x3c], edi
cmp byte [esp + 0x17], 0
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
jne 0x40cfe9
mov ecx, dword [esp + 0x20]
push str.CheckIsQQFile_Fail
call fcn.00402790
mov byte [esp + 0xc18], 0
cmp edi, ebx
je 0x40cfdb
push edi
call esi
add esp, 4
lea ecx, [esp + 0x94]
call fcn.00438c80
jmp 0x40d026
mov byte [esp + 0xc18], 0
cmp edi, ebx
je 0x40cffb
push edi
call esi
add esp, 4
lea ecx, [esp + 0x94]
call fcn.00438c80
mov al, 1
jmp 0x40d028
mov ecx, edi
call fcn.00437ec0
push str.p_pPkgContent
push 0x5192f4
mov edx, eax
call fcn.004392f0
add esp, 8
xor al, al
mov ecx, dword [esp + 0xc10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xbf8]
xor ecx, esp
call fcn.004c60f4
add esp, 0xc08
ret 0x10