Function at 0x600280
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov ebp, dword [esp + 0x1c]
mov eax, 1
xchg dword [0x9b7150], eax
cmp eax, 1
jne 0x6002c6
mov esi, dword [sym.imp.KERNEL32.dll_SleepEx]
nop word cs:[eax + eax]
push 1
push 0
call esi
mov eax, 1
xchg dword [0x9b7150], eax
cmp eax, 1
je 0x6002b0
test ebp, ebp
jne 0x6002fa
cmp dword [0x9b716c], 0
jle 0x6002fa
push str.reusing_default_context
push str.libusb_init
push 4
push dword [0x9b7180]
call fcn.005fe840
add esp, 0x10
inc dword [0x9b716c]
xor edi, edi
jmp 0x6005ee
mov eax, dword [0x8c401c]
mov esi, dword [eax + 0x84]
cmp dword [0x9b718c], 0
jne 0x60032f
mov dword [0x9b718c], 0x9b7188
mov dword [0x9b7188], 0x9b7188
push 0x9b7170
call fcn.007584a0
add esp, 4
add esi, 0x128
push esi
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
test eax, eax
je 0x60035a
mov esi, eax
test ebp, ebp
jne 0x600364
cmp dword [0x9b7154], 0
je 0x600364
mov eax, dword [0x9b7158]
jmp 0x600390
mov edi, 0xfffffff5
jmp 0x6005ee
push str.LIBUSB_DEBUG
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x60039f
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
cmp eax, 4
mov ecx, 4
cmovl ecx, eax
xor eax, eax
test ecx, ecx
cmovg eax, ecx
mov dword [esi], eax
test eax, eax
je 0x6003a5
mov dword [esi + 4], 1
jmp 0x6003a5
mov dword [esi], 0
lea eax, [esi + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esp + 4], eax
push eax
call edi
lea ebx, [esi + 0x3c]
push ebx
call edi
lea eax, [esi + 0x14]
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], eax
lea eax, [esi + 0x34]
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], eax
cmp dword [0x9b715c], 0
je 0x6003eb
push 1
push esi
call fcn.00600150
add esp, 8
mov edi, eax
test eax, eax
jne 0x6005be
cmp dword [0x9b7164], 0
je 0x600409
push 2
push esi
call fcn.00600150
add esp, 8
mov edi, eax
test eax, eax
jne 0x6005be
test ebp, ebp
jne 0x600432
mov dword [0x9b7180], esi
mov dword [0x9b716c], 1
push str.created_default_context
push str.libusb_init
push 4
push esi
call fcn.005fe840
add esp, 0x10
sub esp, 0x24
movaps xmm0, xmmword [0x8c3470]
movups xmmword [esp + 0x10], xmm0
mov dword [esp], esi
mov dword [esp + 0x20], 0x8c3f1b
mov dword [esp + 0xc], str.libusb_v_u._u._u._u_s
mov dword [esp + 8], str.libusb_init
mov dword [esp + 4], 4
call fcn.005fe840
add esp, 0x24
push esi
call fcn.00602990
add esp, 4
test eax, eax
js 0x6005bc
mov eax, 1
xchg dword [0x9b7148], eax
cmp eax, 1
jne 0x6004b6
mov edi, dword [sym.imp.KERNEL32.dll_SleepEx]
nop word cs:[eax + eax]
push 1
push 0
call edi
mov eax, 1
xchg dword [0x9b7148], eax
cmp eax, 1
je 0x6004a0
mov eax, esi
add eax, 0x120
mov ecx, dword [0x9b718c]
mov dword [esi + 0x124], ecx
mov dword [esi + 0x120], 0x9b7188
mov dword [ecx], eax
mov dword [0x9b718c], eax
xor eax, eax
xchg dword [0x9b7148], eax
xor edi, edi
mov eax, dword [0x8c401c]
mov eax, dword [eax + 8]
test eax, eax
je 0x600586
push esi
call eax
add esp, 4
test eax, eax
je 0x600586
mov dword [esp], eax
mov eax, 1
xchg dword [0x9b7148], eax
cmp eax, 1
jne 0x600536
mov edi, dword [sym.imp.KERNEL32.dll_SleepEx]
nop dword [eax + eax]
push 1
push 0
call edi
mov eax, 1
xchg dword [0x9b7148], eax
cmp eax, 1
je 0x600520
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 0x124]
mov dword [ecx], eax
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 0x124]
mov dword [eax + 4], ecx
mov dword [esi + 0x120], 0
mov dword [esi + 0x124], 0
xor eax, eax
xchg dword [0x9b7148], eax
push esi
call fcn.00600960
add esp, 4
push esi
call fcn.00602ca0
add esp, 4
mov edi, dword [esp]
jmp 0x6005be
push esi
call fcn.00600920
add esp, 4
test ebp, ebp
je 0x6005ee
mov dword [ebp], esi
cmp dword [0x9b7184], 0
jne 0x6005ee
mov dword [0x9b7184], esi
push str.installing_new_context_as_implicit_default
push str.libusb_init
push 2
push esi
call fcn.005fe840
add esp, 0x10
jmp 0x6005ee
mov edi, eax
test ebp, ebp
jne 0x6005d6
mov dword [0x9b7180], 0
mov dword [0x9b716c], 0
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
call ebp
push dword [esp + 4]
call ebp
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
xor eax, eax
xchg dword [0x9b7150], eax
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret 4