Function at 0x520310
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x68c018
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x763480]
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, ecx
mov dword [ebp - 0xa4], eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xac], edi
call fcn.00520ab0
mov ecx, esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x520375
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00457e40
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 4], 0
test esi, esi
je 0x5204ee
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x28]
cmp ebx, 0x10
cmovae eax, ecx
mov al, byte [esi + eax - 1]
cmp al, 0x5c
je 0x5204ee
cmp esi, ebx
jae 0x5203d3
lea eax, [esi + 1]
cmp ebx, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
cmovae eax, ecx
mov word [eax + esi], 0x5c
jmp 0x5204e8
mov ecx, closesocket
mov eax, ecx
sub eax, esi
cmp eax, 1
jb 0x520a95
lea edi, [esi + 1]
or edi, 0xf
cmp edi, ecx
jbe 0x520401
mov eax, closesocket
mov edi, ecx
push eax
call fcn.004552f0
add esp, 4
jmp 0x52044d
mov eax, ebx
shr eax, 1
sub ecx, eax
cmp ebx, ecx
jbe 0x520420
mov eax, closesocket
mov edi, closesocket
push eax
call fcn.004552f0
add esp, 4
jmp 0x52044d
add eax, ebx
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x52043c
push eax
call fcn.004552f0
add esp, 4
jmp 0x52044d
test eax, eax
je 0x52044b
push eax
call fcn.005df3dc
add esp, 4
jmp 0x52044d
xor eax, eax
lea ecx, [esi + 1]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
lea edi, [esi + eax]
lea ecx, [esi + 1]
mov dword [ebp - 0xa8], eax
add ecx, eax
mov dword [ebp - 0xb4], edi
mov dword [ebp - 0xb0], ecx
push esi
cmp ebx, 0x10
jb 0x5204c0
mov edi, dword [ebp - 0x28]
push edi
push eax
call fcn.00627190
mov eax, dword [ebp - 0xb4]
inc ebx
add esp, 0xc
mov byte [eax], 0x5c
mov eax, dword [ebp - 0xb0]
mov byte [eax], 0
cmp ebx, 0x1000
jb 0x5204b4
mov ecx, dword [edi - 4]
add ebx, 0x23
sub edi, ecx
lea eax, [edi - 4]
cmp eax, 0x1f
ja 0x520a9a
mov edi, ecx
push ebx
push edi
call fcn.005df40c
add esp, 8
jmp 0x5204d9
lea ecx, [ebp - 0x28]
push ecx
push eax
call fcn.00627190
mov eax, dword [ebp - 0xb0]
add esp, 0xc
mov byte [edi], 0x5c
mov byte [eax], 0
mov eax, dword [ebp - 0xa8]
mov edi, dword [ebp - 0xac]
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp ebx, 0x10
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x70]
push esi
push eax
call fcn.00457cb0
push 3
push 0x69dc7c
lea ecx, [ebp - 0x70]
call fcn.00457cb0
mov ecx, dword [ebp - 0xa4]
lea eax, [ebp - 0x70]
add ecx, 4
push ecx
or dword [ecx], 0x10
cmp dword [ebp - 0x5c], 0x10
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, dword [ebp - 0xa4]
mov dword [esi + 0x144], eax
cmp eax, 0xffffffff
je 0x5209fb
lea ebx, [esi + 0x30]
mov dword [ebp - 0xa8], ebx
nop dword [eax + eax]
cmp byte [ebx], 0x2e
je 0x5209e3
mov ecx, esi
call fcn.00520b00
test al, al
je 0x5205b2
mov ecx, dword [ebp - 0xa4]
cmp dword [ebp - 0x14], 0x10
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push edi
call edx
test al, al
je 0x520a67
mov esi, dword [ebp - 0xa4]
jmp 0x5209e3
push 0x2e
push ebx
call fcn.00627b00
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x5209e0
cmp dword [ebp + 0x10], 0
je 0x520952
mov ecx, edi
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5205f0
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x58]
call fcn.00457e40
cmp dword [ebp - 0x44], 0x10
lea edi, [ebp - 0x58]
mov eax, dword [ebp - 0x48]
cmovae edi, dword [ebp - 0x58]
mov byte [ebp - 4], 2
test eax, eax
je 0x52062f
push eax
push 0x3b
push edi
call fcn.006278f0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x52062f
sub esi, edi
jmp 0x520632
or esi, 0xffffffff
mov edi, dword [ebp - 0xac]
test esi, esi
jle 0x520985
mov ecx, edi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x520660
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x40]
call fcn.00457e40
cmp dword [ebp - 0x30], esi
lea eax, [ebp - 0x40]
mov ecx, esi
mov dword [ebp - 0x88], 0
cmovb ecx, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], 0x10
push ecx
cmovae eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x88]
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0xf
mov byte [ebp - 0x88], 0
call fcn.00457e40
mov edx, dword [ebp - 0x2c]
mov byte [ebp - 4], 5
cmp edx, 0x10
jb 0x5206ef
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5206e5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov ecx, edi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x520710
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x40]
call fcn.00457e40
mov ecx, edi
mov byte [ebp - 4], 6
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x520730
mov eax, dword [ebp - 0x30]
inc esi
sub ecx, edx
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0xf
cmp eax, esi
jb 0x520a9f
sub eax, esi
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push ecx
add eax, esi
lea ecx, [ebp - 0xa0]
push eax
call fcn.00457e40
mov edx, dword [ebp - 0x2c]
mov byte [ebp - 4], 5
cmp edx, 0x10
jb 0x5207bc
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5207b2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
lea esi, [ebx + 1]
push esi
lea ecx, [ebp - 0x88]
call fcn.004689b0
test eax, eax
je 0x5208a5
push esi
lea ecx, [ebp - 0xa0]
call fcn.004689b0
test eax, eax
je 0x5208a5
mov edx, dword [ebp - 0x8c]
cmp edx, 0x10
jb 0x520821
mov ecx, dword [ebp - 0xa0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520817
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov edx, dword [ebp - 0x74]
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x52085c
mov ecx, dword [ebp - 0x88]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520852
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 1
cmp edx, 0x10
jb 0x520894
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x52088a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov esi, dword [ebp - 0xa4]
mov ebx, dword [ebp - 0xa8]
jmp 0x5209e3
mov edx, dword [ebp - 0x8c]
cmp edx, 0x10
jb 0x5208df
mov ecx, dword [ebp - 0xa0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5208d5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov edx, dword [ebp - 0x74]
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x52091a
mov ecx, dword [ebp - 0x88]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520910
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 1
cmp edx, 0x10
jb 0x520952
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520948
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov ecx, dword [ebp - 0xa4]
cmp dword [ebp - 0x14], 0x10
mov eax, dword [ecx]
lea ebx, [ecx + 0x30]
push ebx
mov edx, dword [eax + 8]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call edx
test al, al
je 0x520a67
mov edi, dword [ebp - 0xac]
mov esi, dword [ebp - 0xa4]
jmp 0x5209e3
lea eax, [ebx + 1]
push edi
push eax
call fcn.0063b17d
add esp, 8
test eax, eax
je 0x52091a
mov edx, dword [ebp - 0x44]
mov byte [ebp - 4], 1
cmp edx, 0x10
jb 0x520894
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5209c8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
mov esi, dword [ebp - 0xa4]
add esp, 8
mov ebx, dword [ebp - 0xa8]
jmp 0x5209e3
lea ebx, [esi + 0x30]
lea eax, [esi + 4]
push eax
push dword [esi + 0x144]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x520570
mov bl, 1
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x520a2d
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520a23
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
push edx
push ecx
call fcn.005df40c
add esp, 8
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp edx, 0x10
jb 0x520a75
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x520a6b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a9a
jmp 0x520a6b
xor bl, bl
jmp 0x5209fd
push edx
push ecx
call fcn.005df40c
add esp, 8
mov al, bl
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.005df41a
mov esp, ebp
pop ebp
ret 0xc
call fcn.004556d0
call fcn.00631407
call fcn.0048fd40
int3