Function at 0x4b79b0
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 sub.msvcrt.dll_getenv
mov dword [esp], 0x5b2294
mov esi, eax
call fcn.004bd660
mov ebx, dword [0x5b228c]
test ebx, ebx
je 0x4b7ce1
test edi, edi
je 0x4b7c90
mov dword [esp + 4], 0xa0
mov dword [esp], 1
call sub.msvcrt.dll_calloc
test eax, eax
mov ebx, eax
je 0x4b7d16
test esi, esi
je 0x4b7a20
mov dword [esp], esi
call sub.msvcrt.dll_atoi
test eax, eax
mov dword [ebx], eax
jne 0x4b7c80
mov edx, dword [0x5b2284]
test edx, edx
je 0x4b7d22
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 fcn.004b6600
lea eax, [ebx + 0x18]
mov dword [esp], eax
mov dword [ebp - 0x1c], eax
call fcn.004bd6d0
lea eax, [ebx + 0x24]
mov dword [esp], eax
mov dword [ebp - 0x24], eax
call fcn.004bd6d0
lea eax, [ebx + 0x30]
mov dword [esp], eax
mov dword [ebp - 0x28], eax
call fcn.004bd6d0
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], 0x5b2280
call fcn.004bd660
mov eax, dword [0x5562e0]
mov edx, dword [0x5b33d8]
test eax, eax
jne 0x4b7c60
lea eax, [ebx + 0x98]
mov dword [ebx + 0x9c], edx
mov dword [ebx + 0x98], 0x5b33d4
mov dword [edx], eax
mov dword [esp], 0x5b2280
mov dword [0x5b33d8], eax
call fcn.004bd6b0
mov eax, dword [0x58cee8]
test eax, eax
je 0x4b7b1c
mov dword [esp], ebx
call eax
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x4b7b5b
mov dword [esp], ebx
call fcn.004bb980
test eax, eax
mov dword [ebp - 0x20], eax
js 0x4b7b50
mov dword [esp], 0x5b2294
call fcn.004bd6b0
test edi, edi
je 0x4b7d58
mov dword [edi], ebx
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [0x58ceec]
test eax, eax
je 0x4b7b5b
call eax
cmp ebx, dword [0x5b2284]
je 0x4b7d00
mov dword [esp], 0x5b2280
call fcn.004bd660
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], 0x5b2280
call fcn.004bd6b0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.004bd720
mov ecx, dword [ebx + 0x14]
lea edx, [ecx - 0x1c]
cmp esi, ecx
mov eax, dword [edx + 0x20]
lea edi, [eax - 0x1c]
jne 0x4b7c24
nop
lea esi, [esi]
mov esi, dword [ebp - 0x1c]
mov dword [esp], esi
call fcn.004bd760
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.004bd7e0
mov dword [esp], esi
call fcn.004bd7e0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.004bd7e0
mov dword [esp], ebx
call fcn.004ebfd0
mov dword [esp], 0x5b2294
call fcn.004bd6b0
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 fcn.004b68f0
mov eax, dword [edi + 0x20]
lea edx, [edi + 0x1c]
lea ecx, [eax - 0x1c]
sub esp, 4
cmp esi, edx
jne 0x4b7c20
jmp 0x4b7bd0
mov dword [0x5562e0], 0
mov edx, 0x5b33d4
mov dword [0x5b33d4], 0x5b33d4
jmp 0x4b7ade
mov dword [ebx + 4], 1
jmp 0x4b7a20
mov ecx, dword [0x5b2284]
test ecx, ecx
je 0x4b79ec
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 fcn.004b6600
mov dword [esp], 0x5b2294
add dword [0x5b2298], 1
call fcn.004bd6b0
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], 0x5b228c
call fcn.004d8f00
jmp 0x4b79e4
mov dword [0x5b2284], 0
sub dword [0x5b2298], 1
jmp 0x4b7b67
mov dword [ebp - 0x20], 0xfffffff5
jmp 0x4b7c01
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 [0x5b2284], ebx
add dword [0x5b2298], 1
call fcn.004b6600
jmp 0x4b7a2e
xor eax, eax
jmp 0x4b7c10