Function at 0x420190
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x530985
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x58a06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x24], ebx
cmp dword [ebx + 0x68], 0xffffffff
je 0x4201ce
lea ecx, [ebx + 0x3c]
call sym.XinZhiZao.exe_public:_void___thiscall_itas109::CSerialPort::ClosePort_void_
mov edi, dword [ebx + 0x148]
mov al, byte [ebp + 0xc]
mov byte [ebx + 0xfc], al
mov esi, dword [edi + 0x6ec]
test esi, esi
js 0x420219
cmp esi, dword [edi + 0xa38]
jae 0x420219
mov edi, dword [edi + 0xa34]
xor edx, edx
mov eax, dword [edi]
cmp eax, edi
je 0x420219
nop dword [eax]
mov ecx, dword [eax + 8]
cmp byte [ecx + 0x88], 0
jne 0x420211
cmp esi, edx
je 0x420258
inc edx
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, edi
jne 0x420200
xor eax, eax
push 5
mov edi, dword [ebp + 8]
lea esi, [ebx + 0x3c]
push 5
push 5
push 5
push 5
push 0x200
push 9
push 0
push 8
push 0x4e
push eax
push edi
push dword [ebx + 4]
mov ecx, esi
call sym.XinZhiZao.exe_public:_int___thiscall_itas109::CSerialPort::InitPort_struct_HWND_____unsigned_int__unsigned_int__wchar_t__unsigned_int__unsigned_int__unsigned_long_int__unsigned_int__unsigned_long_int__unsigned_long_int__unsigned_long_int__unsigned_long_int__unsigned_long_int_
push 0
test eax, eax
jne 0x420260
mov ecx, ebx
call fcn.00420480
xor al, al
jmp 0x420434
mov eax, dword [ecx + 0x84]
jmp 0x42021b
push 0
push esi
push sym.XinZhiZao.exe_protected:_static_unsigned_long_int___stdcall_itas109::CSerialPort::CommThread_void__
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 1
mov ecx, ebx
mov dword [esi + 4], eax
call fcn.00420480
call fcn.00401d90
mov ecx, eax
test ecx, ecx
je 0x420452
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push edi
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0
push str.COM_d
push eax
call fcn.00412750
push dword [ebp - 0x14]
mov ecx, dword [ebx + 0x130]
call fcn.004b2304
mov dword [ebx + 0xec], edi
mov edi, dword [ebx + 0x148]
mov esi, dword [edi + 0x6ec]
test esi, esi
js 0x420309
cmp esi, dword [edi + 0xa38]
jae 0x420309
mov edi, dword [edi + 0xa34]
xor edx, edx
mov eax, dword [edi]
cmp eax, edi
je 0x420309
nop dword [eax + eax]
mov ecx, dword [eax + 8]
cmp byte [ecx + 0x88], 0
jne 0x420301
cmp esi, edx
je 0x420322
inc edx
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, edi
jne 0x4202f0
xor eax, eax
mov dword [ebx + 0xf0], eax
call fcn.00401d90
mov ecx, eax
test ecx, ecx
je 0x42045c
jmp 0x42032a
mov eax, dword [ecx + 0x84]
jmp 0x42030b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov edx, str.Config.ini
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.00434e40
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0040a4d0
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x420372
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00401d90
mov ecx, eax
test ecx, ecx
je 0x420466
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 3
push 0x54fc90
push eax
call fcn.00412750
mov edi, dword [ebp - 0x18]
add esp, 0xc
mov esi, dword [ebp - 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push edi
push esi
push 0x5519a8
push str.rffe
call ebx
mov eax, dword [ebp - 0x24]
push edi
mov ecx, dword [eax + 0x148]
mov eax, dword [ecx]
call dword [eax + 0x4c]
push eax
push str.baud
push str.rffe
call ebx
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4203f8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x420413
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420432
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005000f2
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00404aa0
push 0x80004005
call fcn.00404aa0
push 0x80004005
call fcn.00404aa0
int3