Function at 0x4c0230
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
mov dword [esp], str.LIBUSB_DEBUG
call sym._getenv
mov dword [esp], 0x5bd1d4
mov esi, eax
call dbg.usbi_mutex_static_lock
mov ebx, dword [0x5bd1cc]
test ebx, ebx
je 0x4c0561
test edi, edi
je 0x4c0510
mov dword [esp + 4], 0xa0
mov dword [esp], 1
call sym._calloc
test eax, eax
mov ebx, eax
je 0x4c0596
test esi, esi
je 0x4c02a0
mov dword [esp], esi
call sym._atoi
test eax, eax
mov dword [ebx], eax
jne 0x4c0500
mov edx, dword [0x5bd1c4]
test edx, edx
je 0x4c05a2
mov dword [esp + 0x20], str._rc5
lea esi, [ebx + 0x10]
mov dword [esp + 0x1c], 0x2b8d
mov dword [esp + 0x18], 0x15
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], str.libusb_v_u._u._u._u_s
mov dword [esp + 8], str.libusb_init
mov dword [esp + 4], 4
mov dword [esp], 0
call dbg.usbi_log
lea eax, [ebx + 0x18]
mov dword [esp], eax
mov dword [ebp - 0x1c], eax
call dbg.usbi_mutex_init
lea eax, [ebx + 0x24]
mov dword [esp], eax
mov dword [ebp - 0x24], eax
call dbg.usbi_mutex_init
lea eax, [ebx + 0x30]
mov dword [esp], eax
mov dword [ebp - 0x28], eax
call dbg.usbi_mutex_init
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x1c], eax
lea eax, [ebx + 0x28]
mov dword [ebx + 0x14], esi
mov dword [ebx + 0x10], esi
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x28], eax
mov dword [esp], 0x5bd1c0
call dbg.usbi_mutex_static_lock
mov eax, dword [0x560200]
mov edx, dword [0x5be318]
test eax, eax
jne 0x4c04e0
lea eax, [ebx + 0x98]
mov dword [ebx + 0x9c], edx
mov dword [ebx + 0x98], 0x5be314
mov dword [edx], eax
mov dword [esp], 0x5bd1c0
mov dword [0x5be318], eax
call dbg.usbi_mutex_static_unlock
mov eax, dword [dbg.windows_init]
test eax, eax
je 0x4c039c
mov dword [esp], ebx
call eax
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x4c03db
mov dword [esp], ebx
call dbg.usbi_io_init
test eax, eax
mov dword [ebp - 0x20], eax
js 0x4c03d0
mov dword [esp], 0x5bd1d4
call dbg.usbi_mutex_static_unlock
test edi, edi
je 0x4c05d8
mov dword [edi], ebx
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [dbg.windows_exit]
test eax, eax
je 0x4c03db
call eax
cmp ebx, dword [0x5bd1c4]
je 0x4c0580
mov dword [esp], 0x5bd1c0
call dbg.usbi_mutex_static_lock
mov eax, dword [ebx + 0x9c]
mov edx, dword [ebx + 0x98]
mov dword [eax], edx
mov edx, dword [ebx + 0x9c]
mov eax, dword [ebx + 0x98]
mov dword [eax + 4], edx
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x9c], 0
mov dword [esp], 0x5bd1c0
call dbg.usbi_mutex_static_unlock
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.usbi_mutex_lock
mov ecx, dword [ebx + 0x14]
lea edx, [ecx - 0x1c]
cmp esi, ecx
mov eax, dword [edx + 0x20]
lea edi, [eax - 0x1c]
jne 0x4c04a4
nop
lea esi, [esi]
mov esi, dword [ebp - 0x1c]
mov dword [esp], esi
call sym._usbi_mutex_unlock
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dbg.usbi_mutex_destroy
mov dword [esp], esi
call dbg.usbi_mutex_destroy
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dbg.usbi_mutex_destroy
mov dword [esp], ebx
call sym._free
mov dword [esp], 0x5bd1d4
call dbg.usbi_mutex_static_unlock
mov eax, dword [ebp - 0x20]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov edx, edi
mov edi, ecx
mov ecx, dword [edx + 0x1c]
mov dword [eax], ecx
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 0x20]
mov dword [eax + 4], ecx
mov dword [edx + 0x1c], 0
mov dword [edx + 0x20], 0
mov dword [esp], edx
call dbg.libusb_unref_device@4
mov eax, dword [edi + 0x20]
lea edx, [edi + 0x1c]
lea ecx, [eax - 0x1c]
sub esp, 4
cmp esi, edx
jne 0x4c04a0
jmp 0x4c0450
mov dword [0x560200], 0
mov edx, 0x5be314
mov dword [0x5be314], 0x5be314
jmp 0x4c035e
mov dword [ebx + 4], 1
jmp 0x4c02a0
mov ecx, dword [0x5bd1c4]
test ecx, ecx
je 0x4c026c
mov dword [esp + 0xc], str.reusing_default_context
mov dword [esp + 8], str.libusb_init
mov dword [esp + 4], 4
mov dword [esp], 0
call dbg.usbi_log
mov dword [esp], 0x5bd1d4
add dword [0x5bd1d8], 1
call dbg.usbi_mutex_static_unlock
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp + 4], 0
mov dword [esp], 0x5bd1cc
call dbg.gettimeofday
jmp 0x4c0264
mov dword [0x5bd1c4], 0
sub dword [0x5bd1d8], 1
jmp 0x4c03e7
mov dword [ebp - 0x20], 0xfffffff5
jmp 0x4c0481
mov dword [esp + 0xc], str.created_default_context
mov dword [esp + 8], str.libusb_init
mov dword [esp + 4], 4
mov dword [esp], 0
mov dword [0x5bd1c4], ebx
add dword [0x5bd1d8], 1
call dbg.usbi_log
jmp 0x4c02ae
xor eax, eax
jmp 0x4c0490