Function at 0x402480
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x890
mov eax, dword [0x40f020]
xor eax, esp
mov dword [esp + 0x88c], eax
mov eax, dword [esp + 0x894]
push ebx
push ebp
push esi
mov esi, edx
test esi, esi
push edi
mov edi, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], eax
mov ebp, 1
mov dword [esp + 0x24], 0
jne 0x4024e4
mov dword [edi + 8], 4
xor eax, eax
mov ecx, dword [esp + 0x89c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00403110
add esp, 0x890
ret 4
mov edx, dword [edi + 0xc]
push 0x104
lea ecx, [esp + 0x694]
push ecx
call edx
test eax, eax
jne 0x402503
mov dword [edi + 8], 0x102
jmp 0x4024c7
lea eax, [esp + 0x690]
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402510
mov ecx, dword [str.inf_]
mov edx, dword [0x40db8c]
mov dword [eax], ecx
mov ecx, dword [0x40db90]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov eax, esi
mov edx, esi
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402540
lea edi, [esp + 0x690]
sub eax, edx
add edi, 0xfffffffe
jmp 0x402560
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402560
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x694]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
cmp eax, 0xffffffff
je 0x4025c6
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [esp + 0x14]
test edx, edx
je 0x4025bf
lea eax, [esp + 0x690]
mov ecx, eax
sub edx, ecx
mov edi, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4025b0
mov eax, ebp
jmp 0x4024c9
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
push 0x104
lea edx, [esp + 0x694]
push edx
call eax
test eax, eax
jne 0x4025ec
mov dword [esi + 8], 0x102
jmp 0x4024c7
lea edi, [esp + 0x690]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4025f6
mov ecx, 7
mov esi, str.infoem.inf
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x694]
push edx
call ebx
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x4024c7
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupGetInfInformationW]
test ebp, ebp
je 0x4027c3
mov ebp, dword [esp + 0x18]
mov ecx, dword [ebp + 0xc]
push 0x104
lea eax, [esp + 0x694]
push eax
call ecx
lea eax, [esp + 0x690]
add eax, 0xfffffffe
jmp 0x402660
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402660
mov edx, dword [str.inf_]
mov ecx, dword [0x40db8c]
mov dword [eax], edx
mov edx, dword [0x40db90]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [esp + 0x54]
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402690
lea edi, [esp + 0x690]
sub eax, edx
add edi, 0xfffffffe
jmp 0x4026b0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4026b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x10]
push eax
push 0
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push 2
lea ecx, [esp + 0x6a0]
push ecx
call ebx
test eax, eax
je 0x402783
mov edx, dword [esp + 0x10]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
push esi
push 2
lea ecx, [esp + 0x6a0]
push ecx
call ebx
test eax, eax
jne 0x402719
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x402783
mov eax, dword [ebp + 0x10]
lea edx, [esp + 0x278]
push edx
push 0
push 0
push esi
mov dword [esp + 0x288], 0x414
call eax
test eax, eax
push esi
jne 0x402743
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x402783
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x27c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40277a
test dx, dx
je 0x402776
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40277a
add eax, 4
add ecx, 4
test dx, dx
jne 0x402754
xor eax, eax
jmp 0x40277f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40279a
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebp, eax
jmp 0x402630
mov edx, dword [esp + 0x14]
test edx, edx
mov esi, 1
je 0x4027c7
lea eax, [esp + 0x690]
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4027b2
jmp 0x4027c7
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
je 0x4024c7
mov eax, 1
jmp 0x4024c9