Function at 0x4d53d0
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 0x5c4f18
call fcn.004da6b0
add esp, 4
cmp dword [0x5c4f1c], 0
jne 0x4d540f
push 0
push 0x5c4f1c
call fcn.004f3a30
add esp, 8
mov ebx, dword [0x5c4f0c]
test ebp, ebp
jne 0x4d544d
test ebx, ebx
je 0x4d544d
push str.reusing_default_context
push str.libusb_init
push 4
push 0
call fcn.004d3fa0
add esp, 0x10
inc dword [0x5c4f24]
push 0x5c4f18
call fcn.004da700
add esp, 4
xor edi, edi
jmp 0x4d56c3
push 0xa0
push 1
call sub.msvcrt.dll_calloc
add esp, 8
mov esi, eax
test eax, eax
je 0x4d5530
test edi, edi
je 0x4d5480
push edi
call sub.msvcrt.dll_atoi
add esp, 4
test eax, eax
mov dword [esi], eax
je 0x4d5480
mov dword [esi + 4], 1
test ebx, ebx
jne 0x4d54a6
inc dword [0x5c4f24]
mov dword [0x5c4f0c], esi
push str.created_default_context
push str.libusb_init
push 4
push 0
call fcn.004d3fa0
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.004d3fa0
add esp, 0x24
lea edi, [esi + 0x18]
push edi
call fcn.004da720
add esp, 4
lea eax, [esi + 0x24]
mov dword [esp + 8], eax
push eax
call fcn.004da720
add esp, 4
lea eax, [esi + 0x30]
mov dword [esp + 0xc], eax
push eax
call fcn.004da720
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 0x5c4f10
call fcn.004da6b0
add esp, 4
cmp byte [0x5c4f14], 1
jne 0x4d553a
mov eax, dword [0x5c6038]
jmp 0x4d555a
mov edi, 0xfffffff5
jmp 0x4d56b6
mov eax, 0x5c6034
mov dword [0x5c6038], 0x5c6034
mov byte [0x5c4f14], 1
mov dword [0x5c6034], 0x5c6034
lea ecx, [esi + 0x98]
mov dword [esi + 0x9c], eax
mov dword [esi + 0x98], 0x5c6034
mov dword [eax], ecx
mov dword [0x5c6038], ecx
push 0x5c4f10
call fcn.004da700
add esp, 4
mov eax, dword [0x59ee6c]
test eax, eax
je 0x4d559b
push esi
call eax
add esp, 4
test eax, eax
mov dword [esp], eax
jne 0x4d55d5
push esi
call fcn.004d7830
add esp, 4
test eax, eax
js 0x4d55c7
push 0x5c4f18
call fcn.004da700
add esp, 4
xor edi, edi
test ebp, ebp
je 0x4d56c3
mov dword [ebp], esi
jmp 0x4d56c3
mov dword [esp], eax
mov eax, dword [0x59ee70]
test eax, eax
je 0x4d55d5
call eax
cmp dword [0x5c4f0c], esi
jne 0x4d55ed
dec dword [0x5c4f24]
mov dword [0x5c4f0c], 0
push 0x5c4f10
call fcn.004da6b0
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 0x5c4f10
call fcn.004da700
add esp, 4
mov dword [esp + 4], edi
push edi
call fcn.004da750
add esp, 4
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x4d567c
lea ecx, [eax - 0x1c]
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.004d44a0
cmp ebp, ebx
mov eax, ebp
lea ecx, [ebp - 0x1c]
jne 0x4d5650
mov edi, dword [esp + 4]
push edi
call fcn.004da780
add esp, 4
push dword [esp + 8]
call fcn.004da7e0
add esp, 4
push edi
call fcn.004da7e0
add esp, 4
push dword [esp + 0xc]
call fcn.004da7e0
add esp, 4
push esi
call fcn.00506b00
add esp, 4
mov edi, dword [esp]
push 0x5c4f18
call fcn.004da700
add esp, 4
mov eax, edi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 4