Function at 0x402c00
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0xa90
mov eax, dword [0x40f020]
xor eax, esp
mov dword [esp + 0xa8c], eax
mov eax, dword [esp + 0xa94]
push ebx
push ebp
push esi
push edi
mov edi, edx
test edi, edi
mov esi, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
mov ebp, 1
je 0x40301b
test eax, eax
je 0x40301b
mov dword [eax], 0
mov ecx, dword [esi + 0xc]
push 0x104
lea eax, [esp + 0x68c]
push eax
call ecx
test eax, eax
jne 0x402c6c
mov dword [esi + 8], 0x102
jmp 0x403022
lea eax, [esp + 0x688]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402c76
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
mov eax, edi
mov esi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402ca0
lea edi, [esp + 0x688]
sub eax, esi
add edi, 0xfffffffe
jmp 0x402cc0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402cc0
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x20]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [esp + 0x68c]
push ecx
call ebx
cmp eax, 0xffffffff
je 0x402dcf
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetInfInformationW]
lea edx, [esp + 0x10]
push edx
push 0
push 0
push 2
lea eax, [esp + 0x698]
push eax
call edi
test eax, eax
je 0x402dcf
mov ecx, dword [esp + 0x10]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [esp + 0x10]
push 0
push edx
mov esi, eax
push esi
push 2
lea eax, [esp + 0x698]
push eax
call edi
test eax, eax
je 0x402dc8
push 0
push 0x104
lea ecx, [esp + 0x898]
push ecx
push str.DriverVer
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupQueryInfVersionInformationW]
test eax, eax
je 0x402dc8
lea eax, [esp + 0x890]
lea edx, [eax + 2]
jmp 0x402d80
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402d80
sub eax, edx
sar eax, 1
cmp eax, 0xf
jb 0x402d9c
mov word [esp + 0x8ae], cx
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
mov edx, eax
shl edx, 5
add eax, 1
lea ecx, [esp + 0x890]
lea edx, [edx + edi + 4]
mov dword [edi], eax
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x402db7
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0xc]
push 0x104
lea eax, [esp + 0x68c]
push eax
call ecx
test eax, eax
je 0x402c60
lea edi, [esp + 0x688]
add edi, 0xfffffffe
jmp 0x402e00
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x402e00
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x68c]
mov ecx, 7
mov esi, str.infoem.inf
push eax
rep movsd dword es:[edi], dword [esi]
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403022
test ebp, ebp
je 0x403012
mov ebp, dword [esp + 0x14]
mov edx, dword [ebp + 0xc]
push 0x104
lea ecx, [esp + 0x68c]
push ecx
call edx
lea eax, [esp + 0x688]
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402e60
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
lea eax, [esp + 0x4c]
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402e90
lea edi, [esp + 0x688]
sub eax, edx
add edi, 0xfffffffe
jmp 0x402eb0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x402eb0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x10]
push edx
push 0
mov ecx, eax
push 0
and ecx, 3
push 2
lea eax, [esp + 0x698]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetInfInformationW]
push eax
call edi
test eax, eax
je 0x402fff
mov ecx, dword [esp + 0x10]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [esp + 0x10]
push 0
push edx
mov esi, eax
push esi
push 2
lea eax, [esp + 0x698]
push eax
call edi
test eax, eax
je 0x402ff8
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x270]
push ecx
push 0
push 0
push esi
mov dword [esp + 0x280], 0x414
call edx
test eax, eax
je 0x402ff8
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x274]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402f76
test dx, dx
je 0x402f72
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402f76
add eax, 4
add ecx, 4
test dx, dx
jne 0x402f50
xor eax, eax
jmp 0x402f7b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402ff8
push eax
push 0x104
lea eax, [esp + 0x898]
push eax
push str.DriverVer
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupQueryInfVersionInformationW]
test eax, eax
je 0x402ff8
lea eax, [esp + 0x890]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402fb0
sub eax, edx
sar eax, 1
cmp eax, 0xf
jb 0x402fcc
mov word [esp + 0x8ae], cx
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
mov edx, eax
shl edx, 5
add eax, 1
lea ecx, [esp + 0x890]
lea edx, [edx + edi + 4]
mov dword [edi], eax
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x402fe7
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebp, eax
jmp 0x402e32
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x403022
mov dword [esi + 8], 4
mov ecx, dword [esp + 0xa9c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00403110
add esp, 0xa90
ret 4