Function at 0x486a30
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x420
mov eax, dword [0x598b80]
xor eax, esp
mov dword [esp + 0x41c], eax
mov eax, dword [esp + 0x430]
mov ecx, dword [esp + 0x424]
test ecx, ecx
mov edx, dword [esp + 0x42c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x434]
mov dword [esp + 4], eax
mov eax, dword [0x59d4d4]
cmovne eax, ecx
mov dword [esp], edx
push ebx
push edi
mov edi, dword [0x59d4d0]
test eax, eax
cmovne edi, eax
test edi, edi
je 0x486a8a
mov eax, dword [edi]
jmp 0x486abc
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 0x486ab6
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
js 0x486ab6
mov ecx, 4
cmp eax, ecx
cmovg eax, ecx
jmp 0x486ab8
xor eax, eax
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x430]
cmp eax, ebx
jl 0x486cd2
push esi
cmp ebx, 4
ja case.default.0x486ad1
jmp dword [ebx*4 + 0x486cec]
mov esi, str.error
jmp 0x486af9
mov esi, str.warning
jmp 0x486af9
mov esi, str.info
jmp 0x486af9
mov esi, str.debug
jmp 0x486af9
mov esi, str.unknown
push ebp
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
cmp eax, 4
jne 0x486bfc
cmp dword [0x599494], 0
jne 0x486b6e
mov eax, dword [0x599470]
mov dword [0x599494], 1
test eax, eax
je 0x486b32
push str._timestamp___threadID__facility_level__function_call___message__n
push 4
push 0
call eax
jmp 0x486b45
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push str._timestamp___threadID__facility_level__function_call___message__n
call ebp
add esp, 0xc
mov eax, dword [0x599470]
test eax, eax
je 0x486b5b
push str._________________________________________________________________________________n
push 4
push 0
call eax
jmp 0x486b6e
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push str._________________________________________________________________________________n
call ebp
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call fcn.0048a8a0
mov eax, dword [esp + 0x20]
add esp, 4
sub eax, dword [0x599460]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sbb ecx, dword [0x599464]
sub edx, dword [0x599468]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
jns 0x486bbf
sub eax, 1
mov dword [esp + 0x1c], eax
lea eax, [edx + 0x3b9aca00]
sbb ecx, 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
push dword [esp + 0x10]
push esi
push eax
mov eax, 0x10624dd3
imul dword [esp + 0x30]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push dword [esp + 0x2c]
lea eax, [esp + 0x40]
push str.__2ld._06ld____08x__libusb:__s___s_
push 0x400
push eax
call fcn.00486d00
add esp, 0x20
jmp 0x486c15
push edx
push esi
push str.libusb:__s___s_
lea eax, [esp + 0x38]
push 0x400
push eax
call fcn.00486d00
add esp, 0x14
mov esi, eax
test esi, esi
js 0x486c23
cmp esi, 0x400
jl 0x486c25
xor esi, esi
push dword [esp + 0x14]
mov ebp, 0x400
lea eax, [esp + 0x30]
push 0
push dword [esp + 0x20]
sub ebp, esi
add eax, esi
push ebp
push eax
call fcn.00485620
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 2
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsprintf]
mov edx, eax
add esp, 0x1c
or eax, 0xffffffff
test edx, edx
cmovs edx, eax
test edx, edx
js 0x486c6e
lea ecx, [edx + esi]
cmp ecx, 0x400
jl 0x486c70
mov edx, ebp
lea eax, [edx + 2]
mov ecx, 0x3fe
add eax, esi
sub ecx, esi
cmp eax, 0x400
mov eax, 0xa
pop ebp
cmovl ecx, edx
add ecx, esi
mov word [esp + ecx + 0x28], ax
mov eax, dword [0x599470]
test eax, eax
je 0x486ca6
lea ecx, [esp + 0x28]
push ecx
push ebx
push 0
call eax
jmp 0x486cbd
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
add esp, 0xc
test edi, edi
je case.0x486ad1.0
mov eax, dword [edi + 8]
test eax, eax
je case.0x486ad1.0
lea ecx, [esp + 0x28]
push ecx
push ebx
push edi
call eax
pop esi
mov ecx, dword [esp + 0x424]
pop edi
pop ebx
xor ecx, esp
call fcn.00515f8b
add esp, 0x420
ret