Function at 0x59ca50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
xor esi, esi
sub esp, 0x30
mov eax, dword [0x743ca4]
mov ebx, dword [ebp + 8]
add eax, 1
cmp eax, 1
mov dword [0x743ca4], eax
je 0x59cb00
mov dword [ebx + sym._winusb_init], 0x72e300
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
sub esp, 0x10
test eax, eax
mov dword [ebx + 0x12c], eax
je 0x59ccfa
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym._windows_iocp_thread_4
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
mov dword [ebx + 0x130], eax
je 0x59cd3e
xor eax, eax
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
call sym._get_windows_version
test eax, eax
mov dword [0x743b60], eax
je 0x59cd34
cmp eax, 3
jbe 0x59ccd0
mov eax, dword [0x743c9c]
test eax, eax
je 0x59cbe3
mov dword [esp + 0xc], str.program_assertion_failed___hash_table_already_allocated
mov dword [esp + 8], str.htab_create
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._usbi_log
mov dword [esp], ebx
call dword [0x72e300]
test eax, eax
je 0x59cb90
xor esi, esi
cmp dword [0x743ca4], 1
jne 0x59caf4
cmp byte [0x743ca0], 0
jne 0x59cc85
mov edx, esi
test dl, dl
jne 0x59cbd2
mov dword [ebp - 0xc], eax
call sym._htab_destroy
mov eax, dword [ebp - 0xc]
sub dword [0x743ca4], 1
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov dword [esp], ebx
call dword [0x72aac0]
test eax, eax
jne 0x59cca0
mov dword [esp + 0xc], str.UsbDk_backend_is_available
mov dword [esp + 8], str.windows_init
mov esi, 1
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._usbi_log
mov byte [0x743ca0], 1
jmp 0x59ca73
mov dword [ebp - 0xc], eax
mov dword [esp], ebx
call dword [0x72e304]
mov eax, dword [ebp - 0xc]
jmp 0x59cb73
mov dword [esp], 0x743c84
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
mov dword [esp + 0x10], 0x3fd
mov dword [esp + 0xc], str.using__lu_entries_hash_table
mov dword [esp + 8], str.htab_create
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._usbi_log
mov dword [esp + 4], 8
mov dword [esp], 0x3fe
mov dword [0x743c80], 0
call sym._calloc
test eax, eax
mov dword [0x743c9c], eax
jne 0x59cb48
mov dword [esp + 0xc], str.could_not_allocate_space_for_hash_table
mov dword [esp + 8], str.htab_create
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._usbi_log
cmp dword [0x743ca4], 1
mov eax, 0xfffffff5
jne 0x59caf4
cmp byte [0x743ca0], 0
je 0x59cb73
mov dword [ebp - 0xc], eax
mov dword [esp], ebx
call dword [0x72aac4]
mov byte [0x743ca0], 0
mov eax, dword [ebp - 0xc]
jmp 0x59cb6d
mov dword [esp + 0xc], str.UsbDk_backend_is_not_available
mov dword [esp + 8], str.windows_init
mov esi, 1
mov dword [esp + 4], 3
mov dword [esp], ebx
call sym._usbi_log
jmp 0x59ca73
mov dword [esp + 0xc], str.Windows_version_is_too_old
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._usbi_log
mov eax, 0xfffffff4
jmp 0x59cb57
mov dword [esp], 0
call sym._windows_error_str
mov dword [esp + 0xc], str.failed_to_create_I_O_completion_port:__s
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._usbi_log
mov eax, 0xfffffff5
jmp 0x59cb57
mov dword [esp + 0xc], str.failed_to_detect_Windows_version
jmp 0x59ccd8
mov dword [esp + 0xc], str.failed_to_create_I_O_completion_port_thread
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._usbi_log
mov eax, dword [ebx + 0x12c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfffffff5
sub esp, 4
jmp 0x59cb57