Function at 0x58f010
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a378b
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x606040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x26c], ecx
mov eax, dword [eax]
sub eax, 0x10
mov dword [ebp - 0x270], 0
push eax
call fcn.004039f0
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x280], esi
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x274]
call fcn.00402cd0
mov byte [ebp - 4], 1
call fcn.0040a74d
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58f0a7
push 0x80004005
call fcn.00401e70
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x278], ebx
push 0x5df250
lea eax, [ebp - 0x274]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.00405bd0
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, 1
mov edi, dword [eax]
mov eax, dword [ebp - 0x26c]
sub ecx, dword [ebx - 4]
mov eax, dword [eax]
mov dword [ebp - 0x26c], eax
mov eax, dword [ebx - 8]
sub eax, 0x104
or eax, ecx
jge 0x58f114
push 0x104
lea ecx, [ebp - 0x278]
call fcn.00402400
mov ebx, dword [ebp - 0x278]
push edi
push dword [ebp - 0x26c]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov edx, dword [ebp - 0x268]
mov eax, edi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58f148
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebx - 8]
push ebx
call fcn.005360d5
add esp, 8
test eax, eax
js 0x58f695
cmp eax, dword [ebx - 8]
jg 0x58f695
xor ecx, ecx
mov dword [ebx - 0xc], eax
push 0x250
mov word [ebx + eax*2], cx
lea eax, [ebp - 0x260]
push ecx
push eax
call fcn.00539180
add esp, 0xc
lea eax, [ebp - 0x260]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x27c], eax
cmp eax, 0xffffffff
je 0x58f60f
call fcn.0040a74d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x58f09d
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x264], esi
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 4
test eax, 0xffff0000
jne 0x58f1f1
movzx edi, ax
push edi
call fcn.00413a97
test eax, eax
je 0x58f228
push edi
push eax
lea ecx, [ebp - 0x264]
call fcn.00403250
jmp 0x58f222
lea ecx, [ebp - 0x234]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x58f200
sub ecx, edx
lea eax, [ebp - 0x234]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x264]
call fcn.00403930
mov esi, dword [ebp - 0x264]
mov byte [ebp - 4], 5
mov edi, dword [esi - 0xc]
test edi, edi
js 0x58f695
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x58f25a
push edi
lea ecx, [ebp - 0x264]
call fcn.00402400
mov esi, dword [ebp - 0x264]
lea eax, [edi + 1]
push eax
push esi
call fcn.00537b92
add esp, 8
cmp edi, dword [esi - 8]
jg 0x58f695
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
lea edi, [esi - 0x10]
cmp edi, edi
je 0x58f327
cmp dword [edi + 0xc], eax
jl 0x58f312
mov ecx, dword [edi]
cmp ecx, ecx
jne 0x58f312
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x58f2b4
cmp ecx, dword [edi]
jne 0x58f2b4
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x58f2f0
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
je 0x58f690
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00535d59
add esp, 0x10
or eax, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58f307
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0x10
mov dword [ebp - 0x264], esi
jmp 0x58f327
push dword [esi - 0xc]
lea ecx, [ebp - 0x264]
push esi
call fcn.00403930
mov esi, dword [ebp - 0x264]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58f351
push 0x104
lea ecx, [ebp - 0x264]
call fcn.00402400
mov esi, dword [ebp - 0x264]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push dword [esi - 8]
push esi
call fcn.005360d5
add esp, 8
test eax, eax
js 0x58f695
cmp eax, dword [esi - 8]
jg 0x58f695
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebp - 0x284]
mov esi, dword [eax]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
lea edx, [esi - 4]
mov ecx, eax
jl 0x58f3ac
cmp ecx, dword [esi - 0x10]
jne 0x58f3ac
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x58f3e5
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
je 0x58f690
mov ecx, dword [esi - 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esi - 0xc]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ecx*2 + 2]
push esi
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00535d59
add esp, 0x10
lea esi, [edi + 0x10]
mov dword [ebp - 0x268], esi
mov byte [ebp - 4], 6
mov edi, dword [esi - 0xc]
test edi, edi
js 0x58f695
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x58f420
push edi
lea ecx, [ebp - 0x268]
call fcn.00402400
mov esi, dword [ebp - 0x268]
lea eax, [edi + 1]
push eax
push esi
call fcn.00537b92
add esp, 8
cmp edi, dword [esi - 8]
jg 0x58f695
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
lea edi, [esi - 0x10]
cmp edi, edi
je 0x58f4ed
cmp dword [edi + 0xc], eax
jl 0x58f4d8
mov ecx, dword [edi]
cmp ecx, ecx
jne 0x58f4d8
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x58f47a
cmp ecx, dword [edi]
jne 0x58f47a
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x58f4b6
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
je 0x58f690
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00535d59
add esp, 0x10
or eax, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58f4cd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0x10
mov dword [ebp - 0x268], esi
jmp 0x58f4ed
push dword [esi - 0xc]
lea ecx, [ebp - 0x268]
push esi
call fcn.00403930
mov esi, dword [ebp - 0x268]
push 0x5df258
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x288]
push eax
call fcn.00405bd0
add esp, 0xc
push 0x5dbfa4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x264]
push dword [eax]
call fcn.00405990
mov byte [ebp - 4], 6
or ecx, 0xffffffff
mov edx, dword [ebp - 0x288]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58f542
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x264]
xor eax, eax
mov dword [ebp - 0x26c], eax
mov ecx, dword [edi - 0xc]
test ecx, ecx
jle 0x58f58c
test eax, eax
js 0x58f695
cmp eax, ecx
jg 0x58f695
movzx eax, word [edi + eax*2]
push eax
call fcn.00538a95
add esp, 4
test eax, eax
je 0x58f5a7
mov eax, dword [ebp - 0x26c]
mov ecx, dword [edi - 0xc]
inc eax
mov dword [ebp - 0x26c], eax
cmp eax, ecx
jl 0x58f557
push edi
call fcn.00536700
movzx eax, ax
add esp, 4
cmp word [ebp - 0x270], ax
ja 0x58f5a7
mov dword [ebp - 0x270], eax
add esi, 0xfffffff0
mov byte [ebp - 4], 5
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58f5c5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 2
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58f5e3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x260]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x58f1a0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x280]
or edi, 0xffffffff
add ebx, 0xfffffff0
mov byte [ebp - 4], 1
mov ecx, edi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58f62c
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x274]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58f64f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x58f66d
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ax, word [ebp - 0x270]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00535334
mov esp, ebp
pop ebp
ret
call fcn.00402560
push 0x80070057
call fcn.00401e70
int3