Function at 0x407190
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, 1
push ebx
push esi
push edi
mov esi, 0x421550
xchg dword [esi], eax
mov ebx, dword [sym.imp.KERNEL32.dll_SleepEx]
cmp eax, 1
jne 0x4071c2
push 1
push 0
call ebx
mov eax, 1
xchg dword [esi], eax
cmp eax, 1
je 0x4071b0
mov eax, 1
mov esi, 0x42155c
xchg dword [esi], eax
cmp eax, 1
jne 0x4071e5
push 1
push 0
call ebx
mov eax, 1
xchg dword [esi], eax
cmp eax, 1
je 0x4071d3
cmp dword [0x4218bc], 0
jne 0x40720c
mov ecx, 0x4215b8
mov dword [0x4218bc], 0x4218b8
mov dword [0x4218b8], 0x4218b8
call fcn.0040bae0
xor eax, eax
xchg dword [esi], eax
push 0x134
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
jne 0x407239
mov ecx, 0x421550
xchg dword [ecx], eax
lea eax, [edi - 0xb]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push str.LIBUSB_DEBUG
mov dword [edi], 0
call esi
add esp, 4
test eax, eax
je 0x40728d
push str.LIBUSB_DEBUG
call esi
add esp, 4
test eax, eax
je 0x407282
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
js 0x407282
mov ecx, 4
mov dword [edi + 4], 1
cmp eax, ecx
cmovg eax, ecx
jmp 0x40729b
xor eax, eax
mov dword [edi + 4], 1
jmp 0x40729b
cmp dword [0x421590], 0
je 0x40729d
mov eax, dword [0x421594]
mov dword [edi], eax
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [edi + 0x1c]
push eax
call esi
lea eax, [edi + 0x3c]
push eax
call esi
lea eax, [edi + 0x14]
xor esi, esi
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x34]
mov dword [eax + 4], eax
mov dword [eax], eax
test esi, esi
je 0x4072fc
cmp dword [esi*8 + 0x421590], 0
je 0x4072fc
cmp esi, 3
je 0x4072e0
push esi
push edi
call fcn.00406ff0
add esp, 8
jmp 0x4072f1
push dword [0x4215ac]
push 3
push edi
call fcn.00406ff0
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
jne 0x4073f4
inc esi
cmp esi, 4
jl 0x4072c1
push 0x418831
push 0x2e6a
push 0x1b
push 0
push 1
push str.libusb_v_u._u._u._u_s
push str.libusb_init_context
push 4
push edi
call fcn.004078c0
add esp, 0x24
mov ecx, edi
call fcn.00408b40
mov dword [ebp - 4], eax
test eax, eax
js 0x4073f4
mov eax, 1
mov esi, 0x42155c
xchg dword [esi], eax
cmp eax, 1
jne 0x407362
nop word [eax + eax]
push 1
push 0
call ebx
mov eax, 1
xchg dword [esi], eax
cmp eax, 1
je 0x407350
mov eax, dword [0x4218bc]
lea esi, [edi + 0x120]
mov dword [esi + 4], eax
mov ecx, 0x42155c
mov dword [esi], 0x4218b8
mov dword [eax], esi
xor eax, eax
mov dword [0x4218bc], esi
xchg dword [ecx], eax
push edi
call fcn.0040b290
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x407425
mov eax, 1
mov ecx, 0x42155c
xchg dword [ecx], eax
cmp eax, 1
jne 0x4073c8
mov esi, ecx
nop
push 1
push 0
call ebx
mov eax, 1
xchg dword [esi], eax
cmp eax, 1
je 0x4073b0
lea esi, [edi + 0x120]
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov dword [ecx], eax
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
xor eax, eax
mov dword [esi], 0
mov ecx, 0x42155c
mov dword [esi + 4], 0
xchg dword [ecx], eax
mov ecx, edi
call fcn.00408d20
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [edi + 0x3c]
push eax
call esi
lea eax, [edi + 0x1c]
push eax
call esi
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, 0x421550
xor eax, eax
xchg dword [ecx], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [0x4218c8], 0
mov dword [0x421568], edi
jne 0x40745f
cmp dword [0x42108c], 0xffffffff
jne 0x407444
mov eax, dword [edi]
mov dword [0x42108c], eax
push str.installing_new_context_as_implicit_default
push str.libusb_init_context
push 4
push edi
mov dword [0x4218c8], edi
call fcn.004078c0
add esp, 0x10
xor eax, eax
mov ecx, 0x421550
xchg dword [ecx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4