Function at 0x100012e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10009d3f
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x1000e018]
xor eax, esp
mov dword [esp + 0x88], eax
push ebx
push esi
push edi
mov eax, dword [0x1000e018]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
lea edi, [ebx + 4]
mov eax, str.echo
lea esi, [esp + 0x28]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], ebx
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x1000136c
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
mov esi, dword [esp + 0x24]
add esp, 4
test eax, eax
setne cl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x3c], 0x10
mov byte [esi + 0xc], cl
jb 0x100013a2
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp dword [esi + 4], ebx
jne 0x100013f8
mov edi, 3
mov eax, 0x1000b2d0
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov eax, 1
mov dword [esp + 0xa8], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 4]
lea ecx, [esp + 0x24]
push ecx
lea edi, [esp + 0x2c]
call fcn.10002090
mov byte [esp + 0x1f], 1
cmp dword [eax], esi
jne 0x100013fc
mov byte [esp + 0x1f], bl
mov dword [esp + 0xa8], 0xffffffff
test byte [esp + 0x14], 1
je 0x10001428
and dword [esp + 0x14], 0xfffffffe
cmp dword [esp + 0x3c], 0x10
jb 0x10001428
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp byte [esp + 0x1f], bl
je 0x1000155c
push 0x144
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0xa8], 2
cmp eax, ebx
je 0x100014f5
mov edi, 3
mov eax, 0x1000b2d0
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov byte [esp + 0xa8], 3
or dword [esp + 0x14], 2
mov eax, 0x1000b2d0
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov eax, 4
mov dword [esp + 0xa8], eax
or dword [esp + 0x14], eax
lea edx, [esp + 0x44]
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100014cc
mov esi, dword [eax]
jmp 0x100014ce
mov esi, eax
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
call fcn.10001f10
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x100014e7
mov eax, dword [eax]
push esi
push eax
mov eax, dword [esp + 0x2c]
push eax
call fcn.10004a60
jmp 0x100014fa
xor eax, eax
lea edi, [eax + 0x10]
test byte [esp + 0x14], 4
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], eax
je 0x10001531
and dword [esp + 0x14], 0xfffffffb
cmp dword [esp + 0x3c], edi
jb 0x10001521
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
test byte [esp + 0x14], 2
je 0x1000155c
and dword [esp + 0x14], 0xfffffffd
cmp dword [esp + 0x58], edi
jb 0x1000155c
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [esp + 0x20]
cmp dword [ecx + 4], ebx
je 0x100015db
mov edi, 4
mov eax, str.port
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 7
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100015a6
mov eax, dword [eax]
mov edx, dword [esp + 0x20]
mov esi, dword [edx + 4]
push eax
push str.Open_port__s_...
call fcn.10005340
add esp, 8
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x100015db
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [esp + 0x20]
cmp dword [ecx + 8], 0xffffffff
jne 0x100016b8
mov edi, 4
mov eax, str.._
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov dword [esp + 0xa8], 8
mov eax, str.port
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov byte [esp + 0xa8], 9
call fcn.10001f10
push ebx
push eax
or eax, 0xffffffff
lea edi, [esp + 0x30]
call fcn.100021e0
cmp dword [esp + 0x58], 0x10
jb 0x1000166b
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [esp + 0x28]
mov edi, 0x10
cmp dword [esp + 0x3c], edi
jae 0x1000167e
lea eax, [esp + 0x28]
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [esp + 0x20]
mov dword [esp + 0xa8], 0xffffffff
mov dword [esi + 8], eax
cmp dword [esp + 0x3c], edi
jb 0x100016ba
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x100016ba
mov esi, ecx
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
jne 0x100016ca
or eax, 0xffffffff
jmp 0x10001cc5
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_PurgeComm]
mov edx, dword [esi + 8]
lea ecx, [esp + 0x60]
push ecx
push edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x100016c2
mov edi, 5
mov eax, str.speed
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0xa
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10001746
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
mov dword [esp + 0x64], eax
jb 0x10001774
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 6
mov eax, str.parity
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0xb
call fcn.10001f10
cmp dword [eax + 0x10], ebx
jne 0x100017b8
mov byte [esp + 0x73], bl
jmp 0x10001809
mov edi, 6
mov eax, str.parity
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xa8], 0xc
or dword [esp + 0x14], 8
mov edx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100017fb
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [esp + 0x73], al
test byte [esp + 0x14], 8
je 0x1000183a
and dword [esp + 0x14], 0xfffffff7
cmp dword [esp + 0x3c], 0x10
jb 0x1000182a
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x1000185a
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 5
mov eax, str.stops
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0xd
call fcn.10001f10
cmp dword [eax + 0x10], ebx
jne 0x1000189e
mov byte [esp + 0x74], bl
jmp 0x100018f4
mov edi, 5
mov eax, str.stops
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xa8], 0xe
mov esi, 0x10
or dword [esp + 0x14], esi
lea edx, [esp + 0x28]
call fcn.10001f10
cmp dword [eax + 0x14], esi
jb 0x100018e6
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [esp + 0x74], al
test byte [esp + 0x14], 0x10
je 0x10001925
and dword [esp + 0x14], 0xffffffef
cmp dword [esp + 0x3c], 0x10
jb 0x10001915
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x10001945
mov ecx, dword [esp + 0x44]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 3
mov eax, 0x1000b310
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0xf
call fcn.10001f10
cmp dword [eax + 0x10], ebx
jne 0x10001988
lea eax, [edi - 2]
jmp 0x100019d5
mov edi, 3
mov eax, 0x1000b310
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xa8], 0x10
or dword [esp + 0x14], 0x20
mov edx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x100019cb
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov ecx, dword [esp + 0x68]
shl eax, 4
xor eax, ecx
and eax, 0x30
xor ecx, eax
test byte [esp + 0x14], 0x20
mov dword [esp + 0x68], ecx
je 0x10001a18
and dword [esp + 0x14], 0xffffffdf
cmp dword [esp + 0x3c], 0x10
jb 0x10001a08
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x10001a38
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 3
mov eax, 0x1000b314
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0x11
call fcn.10001f10
cmp dword [eax + 0x10], ebx
jne 0x10001a7a
xor eax, eax
jmp 0x10001ac7
mov edi, 3
mov eax, 0x1000b314
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xa8], 0x12
or dword [esp + 0x14], 0x40
mov edx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10001abd
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov ecx, dword [esp + 0x68]
shl eax, 0xc
xor eax, ecx
and eax, 0x3000
xor ecx, eax
test byte [esp + 0x14], 0x40
mov dword [esp + 0x68], ecx
je 0x10001b0c
and dword [esp + 0x14], 0xffffffbf
cmp dword [esp + 0x3c], 0x10
jb 0x10001afc
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x10001b2c
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
and dword [esp + 0x68], 0xfffffcf3
mov edi, 4
mov eax, str.size
lea esi, [esp + 0x44]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0x13
call fcn.10001f10
cmp dword [eax + 0x10], ebx
jne 0x10001b79
mov byte [esp + 0x72], 8
jmp 0x10001bcd
mov edi, 4
mov eax, str.size
lea esi, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov byte [esp + 0xa8], 0x14
or dword [esp + 0x14], 0x80
mov edx, esi
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10001bbf
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [esp + 0x72], al
test byte [esp + 0x14], 0x80
je 0x10001bf9
cmp dword [esp + 0x3c], 0x10
jb 0x10001be9
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0xa8], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x10001c19
mov ecx, dword [esp + 0x44]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edx, edx
mov dword [esp + 0x6e], edx
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 8]
lea ecx, [esp + 0x60]
push ecx
push eax
mov word [esp + 0x7d], bx
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x100016c2
mov edi, 7
mov eax, str.timeout
lea esi, [esp + 0x7c]
mov dword [esp + 0x90], 0xf
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
call fcn.10002290
mov ecx, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 0xa8], 0x15
call fcn.10001f10
cmp dword [eax + 0x14], 0x10
jb 0x10001c86
mov eax, dword [eax]
mov edi, dword [esp + 0x20]
mov esi, dword [edi]
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
mov edx, dword [esi + 4]
add esp, 4
push eax
mov ecx, edi
call edx
test al, al
sete bl
cmp dword [esp + 0x90], 0x10
jb 0x10001cbb
mov eax, dword [esp + 0x7c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
movzx eax, bl
neg eax
sbb eax, eax
and eax, 0xfffffffc
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.10008c0e
mov esp, ebp
pop ebp
ret 4