Function at 0x4ce940
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov ebp, dword [esp + 0x24]
push str.LIBUSB_DEBUG
call sub.msvcrt.dll_getenv
add esp, 4
mov edi, eax
push 0x5d9de8
call fcn.004d3a70
add esp, 4
cmp dword [0x5d9dec], 0
jne 0x4ce97f
push 0
push 0x5d9dec
call fcn.00523430
add esp, 8
mov ebx, dword [0x5d9ddc]
test ebp, ebp
jne 0x4ce9bd
test ebx, ebx
je 0x4ce9bd
push str.reusing_default_context
push str.libusb_init
push 4
push 0
call fcn.004cd4b0
add esp, 0x10
inc dword [0x5d9df4]
push 0x5d9de8
call fcn.004d3ab0
add esp, 4
xor ebx, ebx
jmp 0x4cec43
push 0xa0
push 1
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x4ceaa6
mov esi, eax
test edi, edi
je 0x4ce9f0
push edi
call sub.msvcrt.dll_atoi
add esp, 4
test eax, eax
mov dword [esi], eax
je 0x4ce9f0
mov dword [esi + 4], 1
test ebx, ebx
jne 0x4cea16
inc dword [0x5d9df4]
mov dword [0x5d9ddc], esi
push str.created_default_context
push str.libusb_init
push 4
push 0
call fcn.004cd4b0
add esp, 0x10
push str._rc5
push 0x2b8d
push 0x15
push 0
push 1
push str.libusb_v_u._u._u._u_s
push str.libusb_init
push 4
push 0
call fcn.004cd4b0
add esp, 0x24
lea eax, [esi + 0x18]
mov dword [esp + 4], eax
push eax
call fcn.004d3ad0
add esp, 4
lea eax, [esi + 0x24]
mov dword [esp + 8], eax
push eax
call fcn.004d3ad0
add esp, 4
lea edi, [esi + 0x30]
push edi
call fcn.004d3ad0
add esp, 4
lea ebx, [esi + 0x10]
lea eax, [esi + 0x1c]
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x28]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x28], eax
push 0x5d9de0
call fcn.004d3a70
add esp, 4
cmp byte [0x5d9de4], 1
mov dword [esp + 0xc], edi
mov edi, ebp
jne 0x4ceab0
mov eax, dword [0x5dbad4]
jmp 0x4cead0
mov ebx, 0xfffffff5
jmp 0x4cec36
mov eax, 0x5dbad0
mov dword [0x5dbad4], 0x5dbad0
mov byte [0x5d9de4], 1
mov dword [0x5dbad0], 0x5dbad0
lea ecx, [esi + 0x98]
mov dword [esi + 0x9c], eax
mov dword [esi + 0x98], 0x5dbad0
mov dword [eax], ecx
mov dword [0x5dbad4], ecx
push 0x5d9de0
call fcn.004d3ab0
add esp, 4
mov ebp, dword [0x5bc5d0]
mov eax, dword [ebp + 8]
test eax, eax
je 0x4ceb15
push esi
call eax
add esp, 4
test eax, eax
mov dword [esp], eax
jne 0x4ceb4c
push esi
call fcn.004d0cb0
add esp, 4
test eax, eax
js 0x4ceb40
push 0x5d9de8
call fcn.004d3ab0
add esp, 4
xor ebx, ebx
test edi, edi
je 0x4cec43
mov dword [edi], esi
jmp 0x4cec43
mov dword [esp], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4ceb4c
call eax
cmp dword [0x5d9ddc], esi
jne 0x4ceb64
dec dword [0x5d9df4]
mov dword [0x5d9ddc], 0
push 0x5d9de0
call fcn.004d3a70
add esp, 4
mov eax, dword [esi + 0x98]
mov ecx, dword [esi + 0x9c]
mov dword [ecx], eax
mov eax, dword [esi + 0x98]
mov ecx, dword [esi + 0x9c]
mov dword [eax + 4], ecx
mov dword [esi + 0x98], 0
mov dword [esi + 0x9c], 0
push 0x5d9de0
call fcn.004d3ab0
add esp, 4
push dword [esp + 4]
call fcn.004d3b00
add esp, 4
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x4cebfc
lea ecx, [eax - 0x1c]
nop word cs:[eax + eax]
nop
mov ebp, dword [ecx + 0x20]
mov edx, dword [eax]
mov dword [ebp], edx
mov edx, dword [ecx + 0x20]
mov edi, dword [eax]
mov dword [edi + 4], edx
mov dword [eax], 0
mov dword [ecx + 0x20], 0
push ecx
call fcn.004cd9d0
cmp ebp, ebx
mov eax, ebp
lea ecx, [ebp - 0x1c]
jne 0x4cebd0
mov edi, dword [esp + 4]
push edi
call fcn.004d3b30
add esp, 4
push dword [esp + 8]
call fcn.004d3b90
add esp, 4
push edi
call fcn.004d3b90
add esp, 4
push dword [esp + 0xc]
call fcn.004d3b90
add esp, 4
push esi
call fcn.00537860
add esp, 4
mov ebx, dword [esp]
push 0x5d9de8
call fcn.004d3ab0
add esp, 4
mov eax, ebx
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 4