Function at 0x401a1b
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
push dword [ebp + 0x10]
mov ebx, ecx
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebx + 0x2ac], eax
call fcn.00405a35
push dword [ebp + 8]
mov word [ebx + 0x2c], si
mov word [ebx + 0x2e], si
mov word [ebx + 0x1b0], si
mov word [ebx + 0x1b2], si
mov dword [ebx + 0x18c], esi
mov word [ebx + 0x2a8], si
lea edi, [ebx + 0x32]
mov word [ebx + 0x30], si
mov word [ebx + 4], si
push edi
mov word [ebx + 0x306], si
call fcn.0042b1f0
push 3
push 0x4383e8
push edi
call fcn.0042bbc0
add esp, 0x14
test eax, eax
jne 0x401a96
mov word [ebx + 4], 1
jmp 0x401af5
push 6
push str.USBLPT
push edi
call fcn.0042bbc0
add esp, 0xc
test eax, eax
jne 0x401ab2
mov word [ebx + 4], 2
jmp 0x401af5
push 3
push 0x4383dc
push edi
call fcn.0042bbc0
add esp, 0xc
test eax, eax
jne 0x401af5
lea eax, [ebx + 0x35]
mov word [ebx + 4], 5
push eax
call fcn.0042bbaf
mov dword [ebx + 0x188], eax
mov word [ebx + 0x358], 1
mov word [ebx + 0x306], 1
and byte [ebx + 0x84], 0
pop ecx
mov cl, byte [ebx + 4]
push 1
pop eax
shl eax, cl
push 0x100
mov word [ebx + 6], ax
call fcn.0042b798
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, esi
pop ecx
mov dword [ebx + 0x208], eax
je 0x401bb3
push 0x100
push esi
push eax
call fcn.0042b620
add esp, 0xc
mov dword [ebp + 0x14], esi
push 0x1024
call fcn.0042b798
mov edx, dword [ebx + 0x208]
pop ecx
mov ecx, dword [ebp + 0x14]
mov dword [ecx + edx], eax
mov eax, dword [ebx + 0x208]
mov eax, dword [ecx + eax]
cmp eax, esi
je 0x401b93
push 0x14
add eax, 0x1000
push esi
push eax
call fcn.0042b620
add esp, 0xc
push esi
push esi
push 1
push esi
call edi
mov edx, dword [ebx + 0x208]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + edx]
mov dword [edx + 0x1010], eax
mov eax, dword [ebx + 0x208]
mov eax, dword [ecx + eax]
cmp dword [eax + 0x1010], esi
je 0x401ba9
jmp 0x401b9a
mov dword [ebp - 4], 1
add dword [ebp + 0x14], 4
cmp dword [ebp + 0x14], 0x100
jb 0x401b32
jmp 0x401bba
push str.Failed_to_create_transmit_buffer_events
jmp 0x4020a0
mov dword [ebp - 4], 1
mov ax, word [ebx + 6]
test al, 0x20
je 0x401bce
mov dword [ebx + 0x31c], 0x1000
jmp 0x401be4
test al, 4
je 0x401bde
mov dword [ebx + 0x31c], 0x40
jmp 0x401be4
mov dword [ebx + 0x31c], esi
mov ecx, dword [ebx + 0x31c]
mov eax, dword [0x4531ac]
cmp eax, ecx
ja 0x401bf5
mov eax, ecx
mov dword [ebx + 0x320], eax
shl eax, 2
cmp eax, dword [0x4531a4]
jbe 0x401c0b
mov dword [0x4531a4], eax
mov eax, dword [0x4531a8]
push 0x64
imul eax, dword [0x4531a4]
xor edx, edx
pop ecx
div ecx
mov dword [ebx + 0x324], eax
mov edx, dword [ebx + 0x320]
mov ecx, dword [0x4531a4]
shl edx, 1
sub ecx, edx
cmp eax, ecx
jbe 0x401c3e
mov dword [ebx + 0x324], ecx
mov eax, dword [ebx + 0x324]
shr eax, 1
mov ecx, eax
mov dword [ebx + 0x328], eax
and ecx, 0xfffffffc
cmp ecx, 0x4000
jae 0x401c5e
shr eax, 2
jmp 0x401c63
mov eax, 0x1000
mov dword [ebx + 0x330], eax
cmp word [0x45349a], si
je 0x401ca4
push dword [ebx + 0x320]
push dword [ebx + 0x31c]
push dword [ebx + 0x324]
push dword [ebx + 0x328]
push eax
push dword [0x4531a4]
push str.COMMS:_BufferSize__u__LowThreshold__u__ResumeThreshold__u__FullThreshold__u__ForceLength__u__Min__u
push dword [ebx + 0x2b0]
call fcn.0041e63d
add esp, 0x20
push dword [0x4531a4]
call fcn.0042b798
cmp eax, esi
pop ecx
mov dword [ebx + 0x250], eax
jne 0x401cc1
mov dword [ebp - 4], 1
cmp word [ebp - 4], si
je 0x401cd1
push str.Insufficient_memory
jmp 0x4020a0
push esi
push 1
push 1
push esi
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x298], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x198], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x19c], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x284], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x2a0], eax
call edi
push esi
push esi
push esi
mov dword [ebx + 0x2a4], eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push esi
push esi
push esi
mov dword [ebx + 0x288], eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push esi
push esi
push esi
push esi
mov dword [ebx + 0x28c], eax
call edi
push esi
push esi
push esi
mov dword [ebx + 0x354], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push esi
push esi
push esi
mov dword [ebx + 0x2fc], eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push esi
push esi
push 1
push esi
mov dword [ebx + 0x340], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0x344], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0x23c], eax
call edi
mov dword [ebx + 0x22c], eax
push esi
push esi
push 1
push esi
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x230], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x234], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x238], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x268], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x26c], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x270], eax
call edi
push esi
push esi
push esi
push esi
mov dword [ebx + 0xc], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x280], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x27c], eax
call edi
push esi
push esi
push 1
push esi
mov dword [ebx + 0x290], eax
call edi
mov dword [ebx + 0x294], eax
lea eax, [ebp - 8]
push eax
push esi
push ebx
push 0x406d54
push esi
push esi
call fcn.0042b9c1
add esp, 0x18
cmp dword [ebx + 0x284], esi
mov dword [ebx + 0x1ac], eax
je 0x40209b
cmp dword [ebx + 0x2a0], esi
je 0x40209b
cmp dword [ebx + 0x2a4], esi
je 0x40209b
cmp dword [ebx + 0x288], esi
je 0x40209b
cmp dword [ebx + 0x28c], esi
je 0x40209b
cmp dword [ebx + 0x354], esi
je 0x40209b
cmp dword [ebx + 0x2fc], esi
je 0x40209b
cmp dword [ebx + 0x340], esi
je 0x40209b
cmp dword [ebx + 0x344], esi
je 0x40209b
cmp dword [ebx + 0x23c], esi
je 0x40209b
cmp dword [ebx + 0x298], esi
je 0x40209b
cmp dword [ebx + 0x198], esi
je 0x40209b
cmp dword [ebx + 0x19c], esi
je 0x40209b
cmp dword [ebx + 0x22c], esi
je 0x40209b
cmp dword [ebx + 0x230], esi
je 0x40209b
cmp dword [ebx + 0x234], esi
je 0x40209b
cmp dword [ebx + 0x238], esi
je 0x40209b
cmp dword [ebx + 0x268], esi
je 0x40209b
cmp dword [ebx + 0x26c], esi
je 0x40209b
cmp dword [ebx + 0x270], esi
je 0x40209b
cmp dword [ebx + 0xc], esi
je 0x40209b
cmp dword [ebx + 0x280], esi
je 0x40209b
cmp dword [ebx + 0x27c], esi
je 0x40209b
cmp dword [ebx + 0x290], esi
je 0x40209b
cmp dword [ebx + 0x294], esi
je 0x40209b
cmp eax, esi
je 0x40209b
mov ax, word [ebx + 6]
mov word [ebx + 0x304], 1
test al, 0x39
je 0x402078
push 0x20
pop ecx
and eax, ecx
cmp ax, si
jne 0x401f8c
cmp word [0x4551c6], si
jne 0x401fd4
cmp ax, si
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], 5
mov esi, 0x4354e8
jne 0x401fa5
mov esi, 0x4354f8
lea edi, [ebp - 0x1c]
lea eax, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0
push eax
push dword [0x45418c]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.USER32.dll_RegisterDeviceNotificationA]
test eax, eax
mov dword [ebx + 0x350], eax
jne 0x401fd2
push str.Failed_to_register_for_device_change_notifications
jmp 0x4020a0
xor esi, esi
lea edi, [ebx + 0x32]
push esi
push edi
mov ecx, ebx
call fcn.0040694c
test ax, ax
jne 0x40203d
push esi
mov ecx, ebx
call fcn.0040722c
mov ax, word [0x452ef0]
mov ecx, ebx
neg ax
sbb eax, eax
and eax, 0x3a98
add eax, 0x1388
push eax
push dword [ebp + 0xc]
call fcn.00406fed
test ax, ax
je 0x40203d
push edi
push str.COMMS:_Port_name___s__is_not_known_to_system
push dword [ebp + 0x10]
call fcn.0041e63d
add esp, 0xc
push edi
push 0x1000
push dword [ebp + 0x18]
push 0xa
push 0x454168
call fcn.00420804
add esp, 0x14
jmp 0x4020aa
test byte [ebx + 6], 8
je 0x402078
cmp word [0x4551c6], si
je 0x402066
push str.COMMS:_Using_USB_device_under_Windows_2000___special_workarounds_enabled_
mov word [ebx + 4], 4
push dword [ebx + 0x2b0]
call fcn.0041e63d
pop ecx
pop ecx
jmp 0x40206c
mov word [ebx + 4], 3
mov cl, byte [ebx + 4]
push 1
pop eax
shl eax, cl
mov word [ebx + 6], ax
movzx eax, word [ebx + 4]
push dword [eax*4 + 0x4354b4]
push str.COMMS:_Environment___s
push dword [ebx + 0x2b0]
call fcn.0041e63d
add esp, 0xc
xor ax, ax
jmp 0x4020ae
push str.Failed_to_create_comms_event_objects
push dword [ebp + 0x18]
call fcn.0042b1f0
pop ecx
pop ecx
mov ax, 1
pop edi
pop esi
pop ebx
leave
ret 0x14