Function at 0x486250
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [0x55f60c]
mov eax, 1
mov ebx, 0x599478
xchg dword [ebx], eax
mov ebp, dword [sym.imp.kernel32.dll_SleepEx]
cmp eax, 1
jne 0x486283
push 1
push 0
call ebp
mov eax, 1
xchg dword [ebx], eax
cmp eax, 1
je 0x486271
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x4862c0
cmp dword [0x599474], esi
jle 0x4862c0
push str.reusing_default_context
push str.libusb_init
push 4
push dword [0x59d4d4]
call fcn.00486eb0
inc dword [0x599474]
add esp, 0x10
xor eax, eax
xchg dword [ebx], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
cmp dword [0x59d4cc], 0
jne 0x4862ea
push 0x599460
mov dword [0x59d4cc], 0x59d4c8
mov dword [0x59d4c8], 0x59d4c8
call fcn.0048a8a0
add esp, 4
lea eax, [edi + 0x128]
push eax
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 0x48630e
xchg dword [ebx], eax
lea eax, [edi - 0xb]
pop edi
pop esi
pop ebp
pop ebx
ret 4
test esi, esi
jne 0x486328
cmp dword [0x59947c], esi
je 0x486328
mov eax, dword [0x599480]
mov dword [edi], eax
mov eax, dword [0x599480]
jmp 0x486358
push str.LIBUSB_DEBUG
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x486354
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
js 0x486354
mov ecx, 4
cmp eax, ecx
cmovg eax, ecx
jmp 0x486356
xor eax, eax
mov dword [edi], eax
test eax, eax
je 0x486363
mov dword [edi + 4], 1
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 0x4863a9
cmp dword [esi*8 + 0x59947c], 0
je 0x4863a9
push esi
push edi
call fcn.00486860
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4864f7
inc esi
cmp esi, 3
jl 0x486387
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x4863dc
push str.created_default_context
push str.libusb_init
push 4
push edi
mov dword [0x59d4d4], edi
mov dword [0x599474], 1
call fcn.00486eb0
add esp, 0x10
push 0x55e0cc
push 0x2dcc
push 0x1a
push 0
push 1
push str.libusb_v_u._u._u._u_s
push str.libusb_init
push 4
push edi
call fcn.00486eb0
push edi
call fcn.00489480
mov ebx, eax
add esp, 0x28
test ebx, ebx
js 0x4864fb
mov eax, 1
mov ebx, 0x599458
xchg dword [ebx], eax
cmp eax, 1
jne 0x486434
push 1
push 0
call ebp
mov eax, 1
xchg dword [ebx], eax
cmp eax, 1
je 0x486422
mov eax, dword [0x59d4cc]
lea ebp, [edi + 0x120]
mov dword [ebp + 4], eax
mov dword [ebp], 0x59d4c8
mov eax, dword [0x59d4cc]
mov dword [eax], ebp
xor eax, eax
mov dword [0x59d4cc], ebp
xchg dword [ebx], eax
mov eax, dword [0x55f590]
test eax, eax
je 0x4864b2
push edi
call eax
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4864b2
push 0x599458
call fcn.00486ed0
mov ecx, dword [ebp + 4]
mov eax, dword [ebp]
mov dword [ecx], eax
mov ecx, dword [ebp]
mov eax, dword [ebp + 4]
mov dword [ecx + 4], eax
xor eax, eax
mov dword [ebp], 0
mov ecx, 0x599458
mov dword [ebp + 4], 0
xchg dword [ecx], eax
push edi
call fcn.0048ad10
push edi
call fcn.004893e0
add esp, 0xc
jmp 0x4864fb
push edi
call fcn.0048ae90
add esp, 4
test esi, esi
je 0x4864e5
mov dword [esi], edi
cmp dword [0x59d4d0], 0
jne 0x4864e5
push str.installing_new_context_as_implicit_default
push str.libusb_init
push 2
push edi
mov dword [0x59d4d0], edi
call fcn.00486eb0
add esp, 0x10
xor eax, eax
mov ecx, 0x599478
xchg dword [ecx], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x48650b
mov dword [0x59d4d4], esi
mov dword [0x599474], esi
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
xor eax, eax
mov ecx, 0x599478
xchg dword [ecx], eax
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret 4