Function at 0x101dc67
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x340
mov eax, dword [0x102c22c]
or dword [ebp - 0x324], 0xffffffff
or dword [0x108f9b8], 0xffffffff
push ebx
push esi
push edi
mov esi, 0x1002df8
push esi
push dword [0x108f9bc]
xor ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x328], ebx
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountA]
cmp eax, ebx
mov dword [ebp - 0x330], eax
jg 0x101dcd4
push 4
push ebx
push ebx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
push dword [ebp + 8]
mov dword [ebp - 0x324], eax
push eax
call fcn.0101c8ec
mov dword [ebp - 0x328], eax
jmp 0x101de19
call fcn.01020e55
cmp dword [ebp - 0x330], ebx
mov dword [0x108f9b8], eax
mov dword [ebp - 0x32c], ebx
jle 0x101de19
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
lea eax, [ebp - 0x340]
push eax
push dword [ebp - 0x32c]
push esi
push dword [0x108f9bc]
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexA]
test eax, eax
je 0x101de19
push ebx
push 0x104
lea eax, [ebp - 0x310]
push eax
push ebx
lea eax, [ebp - 0x340]
push eax
call edi
test eax, eax
je 0x101de01
push ebx
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 1
lea eax, [ebp - 0x340]
push eax
call edi
test eax, eax
je 0x101de01
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
push 0x1007c98
call fcn.01015c5a
add esp, 0xc
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01017f6c
cmp eax, ebx
je 0x101dd98
push eax
push 0x1002d90
call fcn.01015c5a
pop ecx
pop ecx
jmp 0x101de01
push ebx
push ebx
push ebx
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, 0xffffffff
mov dword [ebp - 0x324], eax
je 0x101ddc4
push dword [ebp + 8]
push eax
call fcn.0101c8ec
and dword [ebp - 0x328], eax
jmp 0x101dde5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0x1007c70
call fcn.01015c5a
add esp, 0xc
mov dword [ebp - 0x328], ebx
cmp dword [ebp - 0x324], 0xffffffff
je 0x101de01
push dword [ebp - 0x324]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
or dword [ebp - 0x324], 0xffffffff
inc dword [ebp - 0x32c]
mov eax, dword [ebp - 0x32c]
cmp eax, dword [ebp - 0x330]
jl 0x101dcf6
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0x1005980
cmp dword [ebp + 8], 2
jne 0x101ded5
cmp dword [0x106e508], ebx
je 0x101df53
cmp dword [0x106d39c], 0xffffffff
je 0x101df53
push 0x1007844
push 0x1007c64
lea eax, [ebp - 0x108]
push 0x103
push eax
call sub.ntdll.dll__snprintf
add esp, 0x10
cmp dword [0x106d39c], 0xffffffff
je 0x101de24
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x101de77
push ebx
lea ecx, [ebp - 0x330]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [0x106d39c]
call esi
test eax, eax
jne 0x101deb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.01015c5a
add esp, 0xc
jmp 0x101de24
mov eax, dword [0x102dddc]
cmp eax, ebx
je 0x101df53
push ebx
push 0x101dba9
push ebx
push ebx
push dword [0x106e508]
call eax
cmp dword [ebp + 8], 1
jne 0x101df53
cmp dword [0x108f9b8], 0xffffffff
je 0x101df6a
cmp dword [0x106d39c], 0xffffffff
je 0x101df53
push 0x1007c58
push 0x1007c64
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.0100d9ee
add esp, 0x10
cmp dword [0x106d39c], 0xffffffff
je 0x101de24
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x101df25
push ebx
lea ecx, [ebp - 0x32c]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [0x106d39c]
call esi
test eax, eax
je 0x101de9c
call fcn.0101c418
mov eax, dword [0x108f9b8]
cmp eax, 0xffffffff
je 0x101df6a
push eax
call fcn.01020f6e
or dword [0x108f9b8], 0xffffffff
cmp dword [ebp - 0x324], 0xffffffff
pop edi
pop esi
pop ebx
je 0x101df82
push dword [ebp - 0x324]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x328]
call fcn.0101439a
leave
ret 4