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

Disassembly:
push 0xffffffffffffffff
push 0x50d797
mov eax, dword fs:[0]
push eax
sub esp, 0xbfc
mov eax, dword [0x5405a0]
xor eax, esp
mov dword [esp + 0xbf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5405a0]
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 0x40cc3c
cmp ebp, ebx
je 0x40cc3c
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40c706
sub eax, edx
sar eax, 1
je 0x40cc3c
cmp esi, ebx
je 0x40cc3c
push ebp
lea ecx, [esp + 0x98]
call fcn.0043a1c0
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.004d3fc0
add esp, 0xc
cmp byte [esp + 0x1b0], 0
lea eax, [esp + 0xa0]
jne 0x40c76f
mov eax, dword [esp + 0x9c]
add eax, 4
push 0x54c3c8
push eax
call fcn.004cd198
add esp, 8
test eax, eax
je 0x40c7a1
push str._tstat_Fail
mov ecx, edi
call fcn.00402960
lea ecx, [esp + 0x94]
call fcn.0043a230
jmp 0x40cc57
mov edx, 0x4000
test word [0x54c3ce], dx
jne 0x40c7cc
push str._S_IFDIR_Fail
mov ecx, edi
call fcn.00402960
lea ecx, [esp + 0x94]
call fcn.0043a230
jmp 0x40cc57
lea eax, [esp + 0x94]
call fcn.0043a800
push eax
push str._s.
lea edx, [esp + 0x414]
call fcn.004023a0
add esp, 8
push 0x54c178
lea eax, [esp + 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
jne 0x40c826
push str.INVALID_HANDLE_VALUE__hHandle
mov ecx, edi
call fcn.00402960
lea ecx, [esp + 0x94]
call fcn.0043a230
jmp 0x40cc57
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.004ccfcd
mov dword [esp + 0x50], fcn.004cf168
mov dword [esp + 0x54], fcn.004ccef0
mov byte [esp + 0xc18], 1
lea ecx, [ecx]
mov ecx, 0x521374
mov eax, 0x54c1a4
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c896
cmp dx, bx
je 0x40c892
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c896
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40c870
xor eax, eax
jmp 0x40c89b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40cab0
mov ecx, 0x521378
mov eax, 0x54c1a4
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40c8d6
cmp dx, bx
je 0x40c8d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40c8d6
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40c8b0
xor eax, eax
jmp 0x40c8db
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40cab0
push 0x54c1a4
lea ecx, [esp + 0x1c0]
call fcn.0043a1c0
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.004d0add
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.004d3fc0
mov ecx, dword [esp + 0x1cc]
add esp, 0xc
push ecx
lea eax, [esp + 0x1c0]
call fcn.0043a800
push eax
inc ecx
push ecx
push esi
call fcn.004cf75d
add esp, 0x10
lea edx, [esp + 0x24]
push edx
lea esi, [esp + 0x40]
call fcn.004130e0
cmp ebp, ebx
jne 0x40ca9c
lea eax, [esp + 0x58]
push eax
mov ebp, 1
call fcn.00451200
mov ecx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x2e8]
call fcn.0043a1c0
push 0x5212f4
push 0x52139c
lea edx, [esp + 0x2ec]
mov byte [esp + 0xc20], 4
call fcn.0043a8a0
push 0x54c1a4
push 0x52139c
lea edx, [esp + 0x2f4]
call fcn.0043a8a0
add esp, 0x10
push 0x5230c8
lea ecx, [esp + 0x2e8]
mov dword [esp + 0x1c], ebx
call fcn.00437460
push eax
lea edx, [esp + 0x20]
push edx
call fcn.004cf6cb
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebx
je 0x40cacd
push 2
push ebx
push eax
call fcn.004d12e9
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
call fcn.004d11f1
mov ecx, dword [esp + 0x1c]
add esp, 4
push ebx
push ebx
push ecx
mov esi, eax
call fcn.004d12e9
add esp, 0xc
push esi
call fcn.004d0add
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push esi
push ebp
mov edi, eax
push esi
push edi
call fcn.004d0f91
mov eax, dword [esp + 0x2c]
add esp, 0x14
push eax
call fcn.004d038d
add esp, 4
push 0x54c1a4
mov ebx, esi
lea eax, [esp + 0x5c]
call fcn.00451cb0
push edi
test al, al
je 0x40cb05
call fcn.004d051b
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.0043a230
lea ecx, [esp + 0x58]
mov byte [esp + 0xc18], 2
call fcn.004512b0
xor ebx, ebx
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.0043a230
mov edx, dword [esp + 0x2c]
push 0x54c178
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40c860
jmp 0x40cb45
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x17], 0
call fcn.0043a230
lea ecx, [esp + 0x58]
mov byte [esp + 0xc18], 2
call fcn.004512b0
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.0043a230
jmp 0x40cb45
call fcn.004d051b
add esp, 4
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x17], 0
call fcn.0043a230
lea ecx, [esp + 0x58]
mov byte [esp + 0xc18], 2
call fcn.004512b0
lea ecx, [esp + 0x1bc]
mov byte [esp + 0xc18], 1
call fcn.0043a230
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 0x40cbae
xor esi, esi
cmp ebp, ebx
jle 0x40cbae
mov edx, dword [edi + esi*4]
cmp edx, ebx
je 0x40cba0
mov eax, edx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cb71
sub eax, ebx
sar eax, 1
je 0x40cb9e
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.0040c260
test al, al
je 0x40cba7
xor ebx, ebx
inc esi
cmp esi, ebp
jl 0x40cb65
jmp 0x40cbae
mov byte [esp + 0x17], 0
xor ebx, ebx
xor esi, esi
cmp ebp, ebx
jle 0x40cbc9
mov eax, dword [edi + esi*4]
cmp eax, ebx
je 0x40cbc4
push eax
call fcn.004d051b
add esp, 4
inc esi
cmp esi, ebp
jl 0x40cbb4
mov esi, dword [esp + 0x54]
cmp edi, ebx
je 0x40cbdd
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 0x40cc1a
mov ecx, dword [esp + 0x20]
push str.CheckIsQQFile_Fail
call fcn.00402960
mov byte [esp + 0xc18], 0
cmp edi, ebx
je 0x40cc0c
push edi
call esi
add esp, 4
lea ecx, [esp + 0x94]
call fcn.0043a230
jmp 0x40cc57
mov byte [esp + 0xc18], 0
cmp edi, ebx
je 0x40cc2c
push edi
call esi
add esp, 4
lea ecx, [esp + 0x94]
call fcn.0043a230
mov al, 1
jmp 0x40cc59
mov ecx, edi
call fcn.00439450
push str.p_pPkgContent
push 0x52139c
mov edx, eax
call fcn.0043a8a0
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.004ccee1
add esp, 0xc08
ret 0x10