Function at 0x10004ab0
Capabilities:
Enumerate pe sections
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], 0
test edi, edi
je 0x10004ad3
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
jmp 0x10004ad5
xor eax, eax
push dword [eax + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x10004af3
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
push 0xf0
push 1
call fcn.1004b2c2
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10004c55
lea ecx, [ebx + 0xac]
mov dword [ebx + 0x70], 0
push ecx
mov dword [ebx + 0xc4], ebx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
add ebx, 0xc8
je 0x10004c55
mov eax, dword [ebp + 0x20]
movzx eax, ax
mov dword [esp + 0x14], eax
add eax, 8
push eax
call fcn.1004792b
mov esi, eax
add esp, 4
test esi, esi
jne 0x10004c63
mov eax, dword [ebx - 0x20]
test eax, eax
je 0x10004b5e
mov eax, dword [eax + 4]
jmp 0x10004b60
xor eax, eax
push ebx
push str.transfer__p
push str.libusb_free_transfer
push 4
push eax
call fcn.10007340
add esp, 0x14
test byte [ebx + 4], 2
je 0x10004b87
push dword [ebx + 0x20]
call fcn.100475a3
add esp, 4
lea eax, [ebx - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [ebx - 0x20]
mov dword [esp + 0x10], esi
test esi, esi
je 0x10004c46
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x10004c46
movzx eax, byte [esi + 0xe]
push eax
movzx eax, byte [esi + 0xc]
push eax
push str.destroy_device__d._d
push str.libusb_unref_device
push 4
push dword [esi + 4]
call fcn.10007340
mov ecx, dword [esi + 8]
add esp, 0x18
call fcn.100060f0
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x128]
mov eax, dword [eax + 0x3c]
call eax
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi + 0x34], 0
lea esi, [edi + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x10]
push esi
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x14]
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x18]
mov dword [edx + 4], eax
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x10]
mov ecx, edi
push 2
mov edx, esi
call fcn.10008a20
add esp, 4
push esi
call fcn.100475a3
add esp, 4
lea eax, [ebx - 0xc8]
push eax
call fcn.100475a3
add esp, 4
mov eax, 0xfffffff5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov al, byte [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov dl, byte [ebp + 0xc]
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esp + 0x11], al
mov byte [esp + 0x10], cl
movzx eax, word [esp + 0x10]
mov ecx, dword [ebp + 0x18]
mov word [esi + 2], ax
mov eax, ecx
shr eax, 8
mov byte [esp + 0x11], al
mov byte [esp + 0x10], cl
movzx eax, word [esp + 0x10]
mov ecx, dword [ebp + 0x20]
mov word [esi + 4], ax
mov eax, ecx
shr eax, 8
mov byte [esp + 0x11], al
mov byte [esp + 0x10], cl
movzx eax, word [esp + 0x10]
mov byte [esi], dl
mov word [esi + 6], ax
test dl, dl
js 0x10004cd0
push dword [esp + 0x14]
lea eax, [esi + 8]
push dword [ebp + 0x1c]
push eax
call fcn.10043e40
add esp, 0xc
mov eax, dword [ebp + 0x24]
mov dword [ebx + 8], eax
mov dword [ebx], edi
mov word [ebx + 5], 0
mov dword [ebx + 0x20], esi
movzx eax, word [esi + 6]
mov ecx, eax
mov dword [ebx + 0x18], 0x100049e0
and ecx, 0xffffff00
movzx eax, al
or ecx, eax
mov byte [ebx + 4], 2
add ecx, 8
lea eax, [esp + 0x18]
push ebx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x1c], eax
call fcn.100034f0
mov dword [esp + 0x14], eax
test eax, eax
jns 0x10004e2c
mov eax, dword [ebx - 0x20]
test eax, eax
je 0x10004d28
mov eax, dword [eax + 4]
jmp 0x10004d2a
xor eax, eax
push ebx
push str.transfer__p
push str.libusb_free_transfer
push 4
push eax
call fcn.10007340
add esp, 0x14
test byte [ebx + 4], 2
je 0x10004d51
push dword [ebx + 0x20]
call fcn.100475a3
add esp, 4
lea eax, [ebx - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [ebx - 0x20]
mov dword [esp + 0x10], esi
test esi, esi
je 0x10004e10
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x10004e10
movzx eax, byte [esi + 0xe]
push eax
movzx eax, byte [esi + 0xc]
push eax
push str.destroy_device__d._d
push str.libusb_unref_device
push 4
push dword [esi + 4]
call fcn.10007340
mov ecx, dword [esi + 8]
add esp, 0x18
call fcn.100060f0
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x128]
mov eax, dword [eax + 0x3c]
call eax
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi + 0x34], 0
lea esi, [edi + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x10]
push esi
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x14]
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x18]
mov dword [edx + 4], eax
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x10]
mov ecx, edi
push 2
mov edx, esi
call fcn.10008a20
add esp, 4
push esi
call fcn.100475a3
add esp, 4
lea eax, [ebx - 0xc8]
push eax
call fcn.100475a3
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov ecx, ebx
call fcn.10004a20
cmp byte [ebp + 0xc], 0
jge 0x10004e4e
push dword [ebx + 0x14]
mov eax, dword [ebx + 0x20]
add eax, 8
push eax
push dword [ebp + 0x1c]
call fcn.10043e40
add esp, 0xc
mov ecx, dword [ebx + 0xc]
cmp ecx, 6
ja case.default.0x10004e56
jmp dword [ecx*4 + 0x10004fd4]
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x10], eax
jmp 0x10004ec4
mov dword [esp + 0x10], 0xfffffff9
jmp 0x10004ec4
mov dword [esp + 0x10], 0xfffffff7
jmp 0x10004ec4
mov dword [esp + 0x10], 0xfffffffc
jmp 0x10004ec4
mov dword [esp + 0x10], 0xfffffff8
jmp 0x10004ec4
mov dword [esp + 0x10], 0xffffffff
jmp 0x10004ec4
test edi, edi
je 0x10004ea4
mov eax, dword [edi + 0x24]
mov eax, dword [eax + 4]
jmp 0x10004ea6
xor eax, eax
push ecx
push str.unrecognised_status_code__d
push str.libusb_control_transfer
push 2
push eax
call fcn.10007340
add esp, 0x14
mov dword [esp + 0x10], 0xffffff9d
mov eax, dword [ebx - 0x20]
test eax, eax
je 0x10004ed0
mov eax, dword [eax + 4]
jmp 0x10004ed2
xor eax, eax
push ebx
push str.transfer__p
push str.libusb_free_transfer
push 4
push eax
call fcn.10007340
add esp, 0x14
test byte [ebx + 4], 2
je 0x10004ef9
push dword [ebx + 0x20]
call fcn.100475a3
add esp, 4
lea eax, [ebx - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov esi, dword [ebx - 0x20]
mov dword [esp + 0x14], esi
test esi, esi
je 0x10004fb8
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x10004fb8
movzx eax, byte [esi + 0xe]
push eax
movzx eax, byte [esi + 0xc]
push eax
push str.destroy_device__d._d
push str.libusb_unref_device
push 4
push dword [esi + 4]
call fcn.10007340
mov ecx, dword [esi + 8]
add esp, 0x18
call fcn.100060f0
mov eax, dword [esi + 4]
push esi
mov eax, dword [eax + 0x128]
mov eax, dword [eax + 0x3c]
call eax
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi + 0x34], 0
lea esi, [edi + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x14]
push esi
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x14]
mov dword [ecx], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x18]
mov dword [edx + 4], eax
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x14]
mov ecx, edi
push 2
mov edx, esi
call fcn.10008a20
add esp, 4
push esi
call fcn.100475a3
add esp, 4
lea ecx, [ebx - 0xc8]
push ecx
call fcn.100475a3
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20