Function at 0x40da40
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4159d8
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0x420534]
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 ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2b0], ecx
lea ecx, [ebp - 0x58]
push eax
call fcn.00401b00
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0
push eax
call fcn.0040e4e0
add esp, 4
test al, al
je 0x40dab3
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.0040deb0
add esp, 8
test al, al
je 0x40dcb1
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401b00
cmp dword [esi + 0x14], 8
mov byte [ebp - 4], 1
jb 0x40dacb
mov esi, dword [esi]
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.0040af00
push 0x250
lea eax, [ebp - 0x2a8]
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0x14
lea ecx, [ebp - 0x2a8]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push 0
push 0
push 0
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [ebp - 0x2ac], eax
cmp eax, 0xffffffff
je 0x40dc67
nop dword [eax + eax]
cmp byte [ebp + 0x10], 0
je 0x40db33
test byte [ebp - 0x2a8], 0x10
je 0x40dc3e
xor eax, eax
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40db50
sub ecx, edx
lea eax, [ebp - 0x27c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00404eb0
mov ebx, dword [ebp - 0x14]
lea esi, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp ebx, 8
mov eax, dword [ebp - 0x18]
cmovae esi, edi
mov byte [ebp - 4], 2
cmp eax, 1
jne 0x40dba9
mov ecx, 0x416724
mov edx, eax
sub esi, ecx
mov ax, word [ecx + esi]
cmp ax, word [ecx]
jne 0x40dba6
add ecx, 2
sub edx, 1
jne 0x40db93
jmp 0x40dc00
mov eax, dword [ebp - 0x18]
cmp ebx, 8
lea esi, [ebp - 0x28]
cmovae esi, edi
cmp eax, 2
jne 0x40dbd3
mov edx, eax
mov eax, 0x417e54
sub esi, eax
mov cx, word [esi + eax]
cmp cx, word [eax]
jne 0x40dbd3
add eax, 2
sub edx, 1
jne 0x40dbc0
jmp 0x40dc00
mov esi, dword [ebp - 0x2b0]
lea ecx, [ebp - 0x28]
push ecx
mov eax, dword [esi + 4]
cmp dword [esi + 8], eax
je 0x40dbf2
mov ecx, eax
call fcn.00401b00
add dword [esi + 4], 0x18
jmp 0x40dbfa
push eax
mov ecx, esi
call fcn.0040ac30
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp ebx, 8
jb 0x40dc38
lea ecx, [ebx*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x40dc2e
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dd03
push ecx
push edi
call fcn.00411118
add esp, 8
mov eax, dword [ebp - 0x2ac]
lea ecx, [ebp - 0x2a8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40dc5b
mov eax, dword [ebp - 0x2ac]
jmp 0x40db20
push dword [ebp - 0x2ac]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40dc9d
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40dc93
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dd03
push edx
push ecx
call fcn.00411118
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x40dce7
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40dcdd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dd08
push edx
push ecx
call fcn.00411118
add esp, 8
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.00411126
mov esp, ebp
pop ebp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn
call sub.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn
int3