Function at 0x107cb58
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x340
mov eax, dword [0x1099a38]
or dword [ebp - 0x324], 0xffffffff
or dword [0x1116a78], 0xffffffff
push ebx
push esi
push edi
mov esi, 0x10097f8
push esi
push dword [0x1116a7c]
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 0x107cbc5
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.0107abbc
mov dword [ebp - 0x328], eax
jmp 0x107cd0a
call fcn.0108398e
cmp dword [ebp - 0x330], ebx
mov dword [0x1116a78], eax
mov dword [ebp - 0x32c], ebx
jle 0x107cd0a
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
lea eax, [ebp - 0x340]
push eax
push dword [ebp - 0x32c]
push esi
push dword [0x1116a7c]
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexA]
test eax, eax
je 0x107cd0a
push ebx
push 0x104
lea eax, [ebp - 0x310]
push eax
push ebx
lea eax, [ebp - 0x340]
push eax
call edi
test eax, eax
je 0x107ccf2
push ebx
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 1
lea eax, [ebp - 0x340]
push eax
call edi
test eax, eax
je 0x107ccf2
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
push 0x1020ba0
call fcn.01071ac0
add esp, 0xc
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.01074c51
cmp eax, ebx
je 0x107cc89
push eax
push 0x1020b58
call fcn.01071ac0
pop ecx
pop ecx
jmp 0x107ccf2
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 0x107ccb5
push dword [ebp + 8]
push eax
call fcn.0107abbc
and dword [ebp - 0x328], eax
jmp 0x107ccd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0x1020b30
call fcn.01071ac0
add esp, 0xc
mov dword [ebp - 0x328], ebx
cmp dword [ebp - 0x324], 0xffffffff
je 0x107ccf2
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 0x107cbe7
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0x10252e8
cmp dword [ebp + 8], 2
jne 0x107cdc6
cmp dword [0x10f55c8], ebx
je 0x107ce44
cmp dword [0x10f4464], 0xffffffff
je 0x107ce44
push 0x10276d4
push 0x1009b38
lea eax, [ebp - 0x108]
push 0x103
push eax
call sub.msvcrt.dll__snprintf
add esp, 0x10
cmp dword [0x10f4464], 0xffffffff
je 0x107cd15
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x107cd68
push ebx
lea ecx, [ebp - 0x330]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [0x10f4464]
call esi
test eax, eax
jne 0x107cda9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.01071ac0
add esp, 0xc
jmp 0x107cd15
mov eax, dword [0x10bd03c]
cmp eax, ebx
je 0x107ce44
push ebx
push 0x107ca9f
push ebx
push ebx
push dword [0x10f55c8]
call eax
cmp dword [ebp + 8], 1
jne 0x107ce44
cmp dword [0x1116a78], 0xffffffff
je 0x107ce5b
cmp dword [0x10f4464], 0xffffffff
je 0x107ce44
push 0x1027da4
push 0x1009b38
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.01037486
add esp, 0x10
cmp dword [0x10f4464], 0xffffffff
je 0x107cd15
lea eax, [ebp - 0x108]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x107ce16
push ebx
lea ecx, [ebp - 0x32c]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x108]
push eax
push dword [0x10f4464]
call esi
test eax, eax
je 0x107cd8d
call fcn.0107a6f2
mov eax, dword [0x1116a78]
cmp eax, 0xffffffff
je 0x107ce5b
push eax
call fcn.01083bb6
or dword [0x1116a78], 0xffffffff
cmp dword [ebp - 0x324], 0xffffffff
pop edi
pop esi
pop ebx
je 0x107ce73
push dword [ebp - 0x324]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x328]
call fcn.0106bc50
leave
ret 4