Function at 0x40340d
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x614
mov eax, dword [0x405650]
cmp byte [eax], 0
push ebx
push esi
push edi
jne 0x40362d
push dword [0x405b34]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov edi, eax
dec edi
test edi, edi
mov dword [ebp - 8], edi
jle 0x403457
push 0x400
push edi
push dword [0x405b34]
call dword [sym.imp.USER32.dll_RemoveMenu]
dec edi
test edi, edi
jg 0x40343d
mov dword [ebp - 8], edi
mov dword [ebp - 4], 0x405654
mov esi, 0x4059ac
mov eax, dword [ebp - 4]
mov eax, dword [eax - 4]
test eax, eax
je 0x40352a
push 0x405980
push dword [ebp - 4]
mov dword [eax], 0x2a
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x40352a
lea ebx, [ebp + edi*4 - 0x614]
mov al, byte [0x405980]
test al, 0x10
mov ecx, dword [0x4059ac]
je 0x4034c2
cmp cl, 0x2e
jne 0x4034c2
cmp cx, 0x2e
je 0x40350b
mov edx, ecx
and edx, 0xffffff
cmp edx, 0x2e2e
je 0x40350b
test al, 2
jne 0x40350b
test cl, cl
mov eax, esi
je 0x4034d2
inc eax
cmp byte [eax], 0
jne 0x4034cc
sub eax, esi
inc eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
je 0x40350b
mov cl, byte [0x4059ac]
inc edi
mov dword [ebx], eax
mov dword [ebp - 8], edi
add ebx, 4
mov edx, esi
test cl, cl
je 0x403500
mov byte [eax], cl
mov cl, byte [edx + 1]
inc eax
inc edx
jmp 0x4034f3
and byte [eax], 0
cmp edi, 0x180
jge 0x403521
push 0x405980
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403498
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
add dword [ebp - 4], 0x108
cmp dword [ebp - 4], 0x40575c
jle 0x403463
mov eax, dword [0x405b5c]
lea ecx, [eax + 4]
mov eax, dword [0x405afc]
add eax, 0xfffffffa
cdq
idiv ecx
test edi, edi
mov dword [ebp - 0x10], eax
jle 0x40362d
and dword [ebp - 4], 0
push 1
pop esi
jmp 0x403568
mov edi, dword [ebp - 8]
cmp esi, edi
lea eax, [esi - 1]
mov dword [ebp - 0xc], eax
mov ebx, esi
jge 0x4035d6
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov edi, ebx
shl edi, 2
push dword [ebp + edi - 0x614]
push dword [ebp + eax - 0x614]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jle 0x4035a0
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], edi
inc ebx
cmp ebx, dword [ebp - 8]
jl 0x40357a
mov ecx, dword [ebp - 0xc]
lea eax, [esi - 1]
cmp ecx, eax
je 0x4035d3
mov eax, dword [ebp - 4]
mov edi, dword [ebp + ecx*4 - 0x614]
mov edx, dword [ebp + eax - 0x614]
lea ecx, [ebp + ecx*4 - 0x614]
lea eax, [ebp + eax - 0x614]
mov dword [eax], edi
mov dword [ecx], edx
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
lea edx, [eax + 2]
xor ecx, ecx
cmp edi, edx
jg 0x4035e9
add eax, 0xfffffffd
cmp esi, eax
jmp 0x4035f1
mov eax, esi
cdq
idiv dword [ebp - 0x10]
test edx, edx
jne 0x4035f6
push 0x20
pop ecx
mov eax, dword [ebp - 4]
mov edi, dword [ebp + eax - 0x614]
push edi
lea eax, [esi + 0x82ff]
push eax
push ecx
push dword [0x405b34]
call dword [sym.imp.USER32.dll_AppendMenuA]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add dword [ebp - 4], 4
inc esi
lea eax, [esi - 1]
cmp eax, dword [ebp - 8]
jl 0x403565
pop edi
pop esi
pop ebx
leave
ret