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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa34
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push edi
call fcn.00404320
add esp, 8
test eax, eax
jne 0x40a543
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
push 0
push 0
push esi
push str.SampleCycle
lea ecx, [esp + 0x20]
push str.Configuration
push ecx
push edi
call fcn.00405b10
lea edx, [esi + 4]
mov ebx, eax
push 0x104
push edx
neg ebx
push str.PIMLogName
lea eax, [esp + 0x38]
push str.Configuration
push eax
sbb ebx, ebx
push edi
inc ebx
call fcn.00405c40
lea ecx, [esi + 0x20c]
lea edx, [esp + 0x44]
push ecx
push 0
neg eax
push 0
push str.PIMLogRAW
sbb eax, eax
push str.Configuration
inc eax
push edx
push edi
add ebx, eax
call fcn.00405b10
add esp, 0x50
lea ecx, [esp + 0x10]
neg eax
sbb eax, eax
push 0x200
inc eax
add ebx, eax
lea eax, [esp + 0x144]
push eax
push str.PIMLogTiming
push str.Configuration
push ecx
push edi
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x38]
inc eax
add ebx, eax
lea eax, [esi + 0x214]
push eax
push edx
lea eax, [esp + 0x160]
push str._lf_d
push eax
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x28
test eax, eax
je 0x40a630
fld qword [esp + 0x20]
fmul qword [0x426360]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x210], eax
mov eax, dword [esi + 0x214]
cmp eax, 1
jg 0x40a62a
mov eax, 1
mov dword [esi + 0x214], eax
lea ecx, [esp + 0x20]
push 0
push ecx
push 0
push str.LampFlashRate
lea edx, [esp + 0x20]
push str.Configuration
push edx
push edi
call fcn.00405b10
fld qword [esp + 0x3c]
fmul qword [0x426348]
fld qword [0x426300]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40a679
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x218], eax
lea eax, [esp + 0x20]
push 0
push eax
push 0
push str.OBDisplayRate
lea ecx, [esp + 0x20]
push str.Configuration
push ecx
push edi
call fcn.00405b10
fld qword [esp + 0x3c]
fmul qword [0x426348]
fld qword [0x426300]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40a6cd
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov edi, dword [ebp + 0xc]
lea edx, [esp + 0x140]
push 0x200
mov dword [esi + 0x21c], eax
push edx
push str.RFID_Viewer
lea eax, [esp + 0x1c]
push str.Configuration
push eax
push edi
call fcn.00405c40
neg eax
sbb eax, eax
lea ecx, [esi + 0x264]
inc eax
lea edx, [esi + 0x220]
add ebx, eax
push ecx
push edx
lea eax, [esp + 0x160]
push str._s_t_d
push eax
call dword [sym.imp.MSVCRT.dll_swscanf]
lea ecx, [esi + 0x260]
lea edx, [esp + 0x38]
push ecx
push 0
push 0
push str.DebugInfo
push str.Configuration
push edx
push edi
call fcn.00405b10
add esp, 0x44
mov ecx, 0x64
neg eax
sbb eax, eax
lea edi, [esi + 0x268]
inc eax
add ebx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], eax
lea edi, [esi + 0x280]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x540]
push eax
push str.SimInput
push str._s_d
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
lea edx, [esp + 0x550]
lea eax, [esp + 0x20]
push edx
push str.Configuration
push eax
call fcn.00404c50
add esp, 0x1c
test eax, eax
je 0x40a7ca
lea ecx, [edi + 8]
lea edx, [edi - 8]
push ecx
push edi
lea ecx, [edi - 0x10]
push edx
push ecx
lea edx, [edi - 0x14]
lea ecx, [edi - 0x18]
push edx
mov edx, dword [eax + 4]
push ecx
push str._d_d_d_lf_lf_lf
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x20
mov eax, dword [esp + 0x14]
add edi, 0x28
inc eax
cmp eax, 0xa
mov dword [esp + 0x14], eax
jl 0x40a768
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x140]
push 0x200
push eax
push str.DS_ComPort
lea ecx, [esp + 0x1c]
push str.Hardware
push ecx
push edi
call fcn.00405c40
neg eax
sbb eax, eax
push 0
inc eax
lea edx, [esi + 0x660]
add ebx, eax
push 0x2580
lea eax, [esp + 0x160]
push edx
push eax
call fcn.00405d20
lea ecx, [esp + 0x168]
push 0x104
lea edx, [esi + 0x738]
push ecx
push edx
call fcn.00422fc0
lea eax, [esp + 0x174]
push 0x200
push eax
push str.OB_ComPort
lea ecx, [esp + 0x50]
push str.Hardware
push ecx
push edi
call fcn.00405c40
add esp, 0x4c
lea edx, [esi + 0x3fc]
neg eax
sbb eax, eax
inc eax
add ebx, eax
lea eax, [esi + 0x6a0]
push eax
push 0x12c0
lea eax, [esp + 0x148]
push edx
push eax
call fcn.00405d20
lea ecx, [esp + 0x150]
push 0x200
push ecx
push str.OB_LButton
lea edx, [esp + 0x2c]
push str.Hardware
push edx
push edi
call fcn.00405c40
add esp, 0x28
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40a935
lea eax, [esp + 0x140]
mov dword [esp + 0x14], 0
test eax, eax
lea edi, [esp + 0x140]
je 0x40a935
lea ecx, [esi + 0x4e0]
mov dword [esp + 0x18], ecx
cmp word [edi], 0
je 0x40a935
cmp dword [esp + 0x14], 3
jge 0x40a935
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push edi
call fcn.00422ce0
mov ecx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x550]
push 0x20
push eax
push ecx
call fcn.00422fc0
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
add esp, 0x1c
inc edx
add ecx, 0x40
mov dword [esp + 0x14], edx
test edi, edi
mov dword [esp + 0x18], ecx
jne 0x40a8e2
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x140]
push 0x200
push edx
push str.OB_RButton
lea eax, [esp + 0x1c]
push str.Hardware
push eax
push ecx
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40a9d6
lea edx, [esp + 0x140]
mov dword [esp + 0x14], 0
test edx, edx
lea edi, [esp + 0x140]
je 0x40a9d6
add esi, 0x5a0
cmp word [edi], 0
je 0x40a9d6
cmp dword [esp + 0x14], 3
jge 0x40a9d6
push 0x200
lea eax, [esp + 0x544]
push 9
push eax
push edi
call fcn.00422ce0
lea ecx, [esp + 0x550]
push 0x20
push ecx
push esi
mov edi, eax
call fcn.00422fc0
mov edx, dword [esp + 0x30]
add esp, 0x1c
inc edx
add esi, 0x40
test edi, edi
mov dword [esp + 0x14], edx
jne 0x40a98f
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x140]
push 0x200
push edx
push str.OB_Brightness
lea eax, [esp + 0x1c]
push str.Hardware
push eax
push ecx
call fcn.00405c40
mov esi, dword [ebp + 0x10]
lea ecx, [esp + 0x158]
neg eax
sbb eax, eax
lea edx, [esi + 0x4dc]
inc eax
push edx
add ebx, eax
lea eax, [esi + 0x4d8]
push eax
push str._d_d
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x28
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0x15
add esi, 0x9e8
mov edx, dword [esp + 0x14]
mov ecx, 0x2a
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
push edx
push str.Input
lea eax, [esp + 0x48]
push str._s_d
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea ecx, [esp + 0x50]
push str.MessageNo
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.00404c50
add esp, 0x1c
test eax, eax
je 0x40ae20
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x140]
push 0x200
push eax
lea ecx, [esp + 0x48]
push str.MessageNo
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ab06
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00422ce0
push 0xa
lea edx, [esp + 0x554]
push 0
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.MSVCRT.dll_wcstol]
mov ecx, dword [esp + 0x38]
mov dword [esi], eax
push 0xc
lea eax, [esi + 4]
push 9
push eax
push ecx
call fcn.00422ce0
add esp, 0x2c
push 0
lea edx, [esi + 0x1c]
push 0
push edx
lea eax, [esp + 0x4c]
push str.Channel
lea ecx, [esp + 0x20]
push eax
push ecx
push edi
call fcn.00405b10
neg eax
sbb eax, eax
lea edx, [esp + 0x15c]
inc eax
push 0x200
add ebx, eax
push edx
lea eax, [esp + 0x64]
push str.ADC_Config
lea ecx, [esp + 0x38]
push eax
push ecx
push edi
call fcn.00405c40
add esp, 0x34
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ab83
lea edx, [esi + 0x28]
lea eax, [esi + 0x24]
push edx
lea ecx, [esi + 0x20]
push eax
push ecx
lea edx, [esp + 0x14c]
push str._d_d_d
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x14
lea eax, [esp + 0x140]
push 0x200
push eax
lea ecx, [esp + 0x48]
push str.Linearisation
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ac13
lea eax, [esi + 0x58]
lea ecx, [esi + 0x50]
push eax
lea edx, [esi + 0x48]
push ecx
lea eax, [esi + 0x40]
push edx
lea ecx, [esi + 0x38]
push eax
lea edx, [esi + 0x30]
push ecx
push edx
lea eax, [esp + 0x158]
push str._lf_lf_lf_lf_lf_lf
push eax
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x20
cmp eax, 6
jge 0x40ac13
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x10]
add ecx, eax
lea edi, [edx + ecx*8 + 0x970]
mov ecx, 6
sub ecx, eax
shl ecx, 1
and ecx, 0x3ffffffe
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x140]
push 0x200
push eax
lea ecx, [esp + 0x48]
push str.Filter
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ac68
lea eax, [esi + 0x68]
lea ecx, [esi + 0x60]
push eax
push ecx
lea edx, [esp + 0x148]
push str._lf_d
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x10
mov eax, dword [esi + 0x68]
test eax, eax
jl 0x40ac74
cmp eax, 0xf
jge 0x40ac80
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and eax, ecx
jmp 0x40ac85
mov eax, 0xf
lea edx, [esp + 0x140]
mov dword [esi + 0x68], eax
push 0x200
push edx
lea eax, [esp + 0x48]
push str.DetectVal
lea ecx, [esp + 0x1c]
push eax
push ecx
push edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ace4
lea edx, [esi + 0x80]
lea eax, [esi + 0x78]
push edx
lea ecx, [esi + 0x70]
push eax
push ecx
lea edx, [esp + 0x14c]
push str._lf_lf_lf
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x14
lea eax, [esp + 0x140]
push 0x200
push eax
lea ecx, [esp + 0x48]
push str.DetectEdge
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ae20
lea eax, [esp + 0x30]
lea ecx, [esp + 0x20]
push eax
lea edx, [esi + 0x98]
push ecx
lea eax, [esi + 0x90]
push edx
lea ecx, [esp + 0x54c]
push eax
push ecx
lea edx, [esp + 0x154]
push str._s_lf_lf_lf_lf
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
mov edi, dword [sym.imp.MSVCRT.dll__wcsicmp]
lea eax, [esp + 0x55c]
push str.RISE
push eax
call edi
add esp, 0x24
test eax, eax
jne 0x40ad7a
mov dword [esi + 0x88], 1
jmp 0x40adc8
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40ad9c
mov dword [esi + 0x88], 2
jmp 0x40adc8
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40adbe
mov dword [esi + 0x88], 3
jmp 0x40adc8
mov dword [esi + 0x88], 0
fld qword [esp + 0x20]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40ade9
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xa0], eax
fld qword [esp + 0x30]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40ae15
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xa4], eax
mov eax, dword [esp + 0x14]
add esi, 0xa8
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
add eax, 0x15
cmp eax, 0x2a0
mov dword [esp + 0x18], eax
jle 0x40aa3f
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0x7d5
lea esi, [eax + 0x1f38]
mov dword [esp + 0x1c], esi
mov ecx, 0x14
xor eax, eax
mov edi, esi
lea edx, [esp + 0x40]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
push ecx
push 0x42bb5c
push str._s_d
push edx
call dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [esp + 0x50]
push str.MessageNo
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00404c50
add esp, 0x1c
test eax, eax
je 0x40b271
lea edx, [esp + 0x140]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x48]
push str.MessageNo
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40af23
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00422ce0
push 0xa
lea edx, [esp + 0x554]
push 0
push edx
mov edi, eax
call dword [sym.imp.MSVCRT.dll_wcstol]
mov dword [esi], eax
push 0xc
add esi, 4
push 9
push esi
push edi
call fcn.00422ce0
add esp, 0x2c
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.Channel
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
xor edi, edi
inc eax
mov dword [esp + 0x2c], edi
add ebx, eax
cmp word [esp + 0x140], di
je 0x40afd3
lea ecx, [esp + 0x140]
lea esi, [esp + 0x140]
test ecx, ecx
je 0x40afd3
cmp edi, 8
jge 0x40afd3
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push esi
call fcn.00422ce0
add esp, 0x10
cmp word [esp + 0x540], 0
mov esi, eax
je 0x40afbb
lea eax, [esp + 0x540]
push eax
call dword [sym.imp.MSVCRT.dll__wtoi]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp + 0x10]
add esp, 4
add ecx, edi
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x10]
add eax, edi
cmp dword [ecx + eax*4], 0
jle 0x40afce
mov dword [esp + 0x2c], edi
inc edi
test esi, esi
jne 0x40af74
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov esi, dword [ebp + 0x10]
xor eax, eax
cmp eax, edi
jge 0x40affa
lea ecx, [edx + eax]
cmp dword [esi + ecx*4], 0
lea ecx, [esi + ecx*4]
jg 0x40aff8
mov dword [ecx], 0xffffffff
jmp 0x40b006
cmp eax, edi
jle 0x40b006
lea ecx, [edx + eax]
mov dword [esi + ecx*4], 0
inc eax
cmp eax, 8
jl 0x40afe0
mov edi, dword [ebp + 0xc]
lea edx, [esp + 0x140]
push 0x200
push edx
lea eax, [esp + 0x48]
push str.DO_Type
lea ecx, [esp + 0x1c]
push eax
push ecx
push edi
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x158]
inc eax
push str.PULSE_NEG
push edx
add ebx, eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
mov esi, dword [esp + 0x3c]
add esp, 0x20
test eax, eax
jne 0x40b05f
mov dword [esi + 0x3c], 1
jmp 0x40b066
mov dword [esi + 0x3c], 0
lea eax, [esp + 0x140]
push 0x200
push eax
lea ecx, [esp + 0x48]
push str.DO_Delay
lea edx, [esp + 0x1c]
push ecx
push edx
push edi
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call fcn.00405c40
neg eax
sbb eax, eax
lea ecx, [esp + 0x38]
inc eax
lea edx, [esp + 0x158]
add ebx, eax
lea eax, [esp + 0x48]
push eax
push ecx
push 0x42bb14
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x48]
fmul qword [0x426348]
fld qword [0x426300]
add esp, 0x28
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40b0f0
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x40], eax
fld qword [esp + 0x30]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40b119
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x44], eax
lea eax, [esp + 0x20]
push 0
push eax
push 0
lea ecx, [esp + 0x4c]
push str.DO_Freq
lea edx, [esp + 0x20]
push ecx
push edx
push edi
call fcn.00405b10
fld qword [esp + 0x3c]
fcomp qword [0x426300]
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
je 0x40b161
xor eax, eax
jmp 0x40b219
fld qword [0x426348]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x4262d0]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x426358]
add esp, 8
fnstsw ax
test ah, 1
jne 0x40b1b9
fld qword [0x426348]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x4262d0]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x426350]
add esp, 8
fnstsw ax
test ah, 1
je 0x40b20e
fld qword [0x426348]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x4262d0]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x426358]
add esp, 8
fnstsw ax
test ah, 1
je 0x40b1ed
fld qword [0x426358]
jmp 0x40b214
fld qword [0x426348]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x4262d0]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
jmp 0x40b214
fld qword [0x426350]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x4c], eax
lea eax, [esp + 0x20]
push 0
push eax
push 0
lea ecx, [esp + 0x4c]
push str.DO_Duration
lea edx, [esp + 0x20]
push ecx
push edx
push edi
call fcn.00405b10
fld qword [esp + 0x3c]
fmul qword [0x426348]
fld qword [0x426300]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40b265
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x48], eax
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add esi, 0x50
inc eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
add eax, 0x14
cmp eax, 0xa41
mov dword [esp + 0x18], eax
jle 0x40ae62
mov ecx, dword [ebp + 0x10]
mov eax, 0xffffd6c8
sub eax, ecx
mov dword [esp + 0x14], 1
mov dword [esp + 0x38], 0x1c2
lea esi, [ecx + 0x3748]
mov dword [esp + 0x2c], eax
mov ecx, 0x384
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x40]
push eax
push str.ComIn
push str._s_d
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
lea edx, [esp + 0x50]
push str.MessageNo
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00404c50
add esp, 0x1c
test eax, eax
je 0x40ba58
lea ecx, [esp + 0x140]
push 0x200
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x48]
push str.MessageNo
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40b37c
push 0x200
lea edx, [esp + 0x544]
push 9
lea eax, [esp + 0x148]
push edx
push eax
call fcn.00422ce0
push 0xa
lea ecx, [esp + 0x554]
push 0
push ecx
mov edi, eax
call dword [sym.imp.MSVCRT.dll_wcstol]
push 0xc
lea edx, [esi + 4]
push 9
push edx
push edi
mov dword [esi], eax
call fcn.00422ce0
add esp, 0x2c
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.ComPort
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405c40
mov edi, dword [sym.imp.MSVCRT.dll__wcsnicmp]
push 3
neg eax
sbb eax, eax
lea ecx, [esp + 0x15c]
inc eax
push 0x42a5f0
push ecx
add ebx, eax
call edi
add esp, 0x24
test eax, eax
je 0x40b402
push 4
lea edx, [esp + 0x144]
push str.BASE
push edx
call edi
add esp, 0xc
test eax, eax
je 0x40b402
push 0x20
lea eax, [esi + 0x5c]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00422ce0
add esp, 0x10
mov dword [esi + 0x9c], 0
jmp 0x40b425
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x140]
lea eax, [edx + 0x6a0]
push eax
lea eax, [esi + 0x1c]
push 0x12c0
push eax
push ecx
call fcn.00405d20
add esp, 0x10
lea edx, [esp + 0x140]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x48]
push str.SetupString
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
xor edi, edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40b4a9
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
je 0x40b4a9
lea edx, [esi + 0xf4]
mov dword [esp + 0x18], edx
cmp edi, 0xa
jge 0x40b4a9
mov ecx, dword [esp + 0x18]
push 0x80
push 9
push ecx
push eax
call fcn.00422ce0
mov edx, dword [esp + 0x28]
add esp, 0x10
inc edi
add edx, 0x100
test eax, eax
mov dword [esp + 0x18], edx
jne 0x40b47c
mov edx, dword [esp + 0x2c]
lea ecx, [esi + 0xbf4]
shl edi, 8
lea eax, [esi + edx]
push 0x80
mov dword [esp + 0x40], eax
add edi, eax
mov eax, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x48]
mov word [edi + eax + 0x2a2c], 0
push str.RequestString
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x158]
inc eax
push 0x200
add ebx, eax
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x60]
push str.CycleTiming
lea ecx, [esp + 0x34]
push eax
push ecx
push edx
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call fcn.00405c40
neg eax
sbb eax, eax
lea ecx, [esp + 0x50]
inc eax
lea edx, [esp + 0x170]
add ebx, eax
lea eax, [esp + 0x60]
push eax
push ecx
push 0x42bb14
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x60]
fmul qword [0x426348]
fld qword [0x426300]
add esp, 0x40
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40b57e
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xcf4], eax
fld qword [esp + 0x30]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40b5aa
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xcf8], eax
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.Terminator
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
xor edi, edi
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40b64d
lea edx, [esp + 0x140]
lea ecx, [esp + 0x140]
test edx, edx
mov dword [esp + 0x1c], ecx
je 0x40b64d
cmp edi, 0xa
jge 0x40b64d
mov ecx, dword [esp + 0x1c]
push 0x200
lea eax, [esp + 0x544]
push 0
push eax
push ecx
call fcn.00422ce0
push 0xa
lea edx, [esp + 0x554]
push 0
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.MSVCRT.dll_wcstol]
mov byte [esi + edi + 0xcfc], al
mov eax, dword [esp + 0x38]
add esp, 0x1c
inc edi
test eax, eax
jne 0x40b606
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + 0x10]
add eax, edi
lea edx, [esp + 0x140]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
mov byte [eax + ecx + 0x3634], 0
lea eax, [esp + 0x48]
push str.Parsing
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40b7a7
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00422ce0
mov edi, eax
lea edx, [esi + 0xd06]
push 0x80
lea eax, [esp + 0x554]
push edx
push eax
call fcn.00424260
push 0x200
lea ecx, [esp + 0x560]
push 9
push ecx
push edi
call fcn.00422ce0
push 0xa
lea edx, [esp + 0x570]
push 0
push edx
mov edi, eax
call dword [sym.imp.MSVCRT.dll_wcstol]
mov dword [esi + 0xd88], eax
push 0x200
lea eax, [esp + 0x57c]
push 9
push eax
push edi
call fcn.00422ce0
add esp, 0x48
lea ecx, [esp + 0x540]
mov edi, eax
push 0xa
push 0
push ecx
call dword [sym.imp.MSVCRT.dll_wcstol]
push 0x200
lea edx, [esp + 0x550]
push 9
push edx
push edi
mov dword [esi + 0xd8c], eax
call fcn.00422ce0
mov edi, dword [sym.imp.MSVCRT.dll__wcsicmp]
lea eax, [esp + 0x55c]
push 0x42a5d0
push eax
call edi
add esp, 0x24
test eax, eax
je 0x40b79d
lea ecx, [esp + 0x540]
push 0x42a5c8
push ecx
call edi
add esp, 8
test eax, eax
je 0x40b79d
lea edx, [esp + 0x540]
push 0x42a5c4
push edx
call edi
add esp, 8
test eax, eax
je 0x40b79d
mov dword [esi + 0xd90], 0
jmp 0x40b7a7
mov dword [esi + 0xd90], 0xff
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.Linearisation
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405c40
neg eax
sbb eax, eax
lea ecx, [esi + 0xdc0]
inc eax
lea edx, [esi + 0xdb8]
add ebx, eax
push ecx
lea eax, [esi + 0xdb0]
push edx
lea ecx, [esi + 0xda8]
push eax
lea edx, [esi + 0xda0]
push ecx
lea eax, [esi + 0xd98]
push edx
push eax
lea ecx, [esp + 0x170]
push str._lf_lf_lf_lf_lf_lf
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x38
cmp eax, 6
jge 0x40b83b
mov edx, dword [esp + 0x38]
mov ecx, dword [ebp + 0x10]
add edx, eax
lea edi, [ecx + edx*8 + 0x36d0]
mov ecx, 6
sub ecx, eax
shl ecx, 1
and ecx, 0x3ffffffe
xor eax, eax
rep stosd dword es:[edi], eax
lea edx, [esp + 0x140]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x48]
push str.Filter
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call fcn.00405c40
neg eax
sbb eax, eax
lea edi, [esi + 0xdd0]
inc eax
push edi
add ebx, eax
lea eax, [esi + 0xdc8]
push eax
lea ecx, [esp + 0x160]
push str._lf_d
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
mov eax, dword [edi]
add esp, 0x28
test eax, eax
jl 0x40b896
cmp eax, 0xf
jge 0x40b8a2
xor edx, edx
test eax, eax
setl dl
dec edx
and eax, edx
jmp 0x40b8a7
mov eax, 0xf
mov dword [edi], eax
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.DetectVal
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405c40
neg eax
sbb eax, eax
mov edi, dword [sym.imp.MSVCRT.dll_swscanf]
inc eax
lea ecx, [esi + 0xde8]
add ebx, eax
lea edx, [esi + 0xde0]
push ecx
lea eax, [esi + 0xdd8]
push edx
push eax
lea ecx, [esp + 0x164]
push str._lf_lf_lf
push ecx
call edi
lea edx, [esp + 0x16c]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x74]
push str.DetectEdge
lea ecx, [esp + 0x48]
push eax
push ecx
push edx
call fcn.00405c40
add esp, 0x44
lea ecx, [esp + 0x20]
neg eax
sbb eax, eax
lea edx, [esi + 0xe00]
inc eax
add ebx, eax
lea eax, [esp + 0x30]
push eax
push ecx
lea eax, [esi + 0xdf8]
push edx
lea ecx, [esp + 0x54c]
push eax
push ecx
lea edx, [esp + 0x154]
push str._s_lf_lf_lf_lf
push edx
call edi
mov edi, dword [sym.imp.MSVCRT.dll__wcsicmp]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x55c]
push str.RISE
push eax
call edi
add esp, 0x24
test eax, eax
jne 0x40b989
mov dword [esi + 0xdf0], 1
jmp 0x40b9f9
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40b9ab
mov dword [esi + 0xdf0], 2
jmp 0x40b9f9
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40b9cd
mov dword [esi + 0xdf0], 3
jmp 0x40b9f9
lea eax, [esp + 0x540]
push 0x42bab0
push eax
call edi
add esp, 8
test eax, eax
jne 0x40b9ef
mov dword [esi + 0xdf0], 4
jmp 0x40b9f9
mov dword [esi + 0xdf0], 0
cmp dword [esp + 0x18], 4
jle 0x40ba58
fld qword [esp + 0x20]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40ba21
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xe08], eax
fld qword [esp + 0x30]
fmul qword [0x426348]
fld qword [0x426300]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40ba4d
fstp st(0)
fld qword [0x426300]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xe0c], eax
mov eax, dword [esp + 0x14]
add esi, 0xe10
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
add eax, 0x1c2
cmp eax, 0xfd2
mov dword [esp + 0x38], eax
jle 0x40b2bb
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x14], 1
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x3c], 0x30
lea esi, [ecx + 0xb998]
mov edx, dword [esp + 0x14]
mov ecx, 0xf0
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
push edx
push str.RfID
lea eax, [esp + 0x48]
push str._s_d
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea ecx, [esp + 0x50]
push str.Messages
lea edx, [esp + 0x24]
push ecx
push edx
call fcn.00404c50
add esp, 0x1c
test eax, eax
je 0x40bf26
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.Messages
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40bc08
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], 1
test ecx, ecx
lea eax, [esp + 0x140]
je 0x40bc08
jmp 0x40bb46
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], 4
jg 0x40bc08
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push eax
call fcn.00422ce0
add esp, 0x10
cmp word [esp + 0x540], 0
mov dword [esp + 0x1c], eax
je 0x40bbf3
lea ecx, [esp + 0x540]
xor edi, edi
lea eax, [esp + 0x540]
test ecx, ecx
mov dword [esp + 0x38], eax
je 0x40bbf3
cmp edi, 5
jg 0x40bbf3
mov eax, dword [esp + 0x38]
push 0x80
lea edx, [esp + 0x944]
push 0x3b
push edx
push eax
call fcn.00422ce0
add esp, 0x10
cmp word [esp + 0x940], 0
mov dword [esp + 0x38], eax
je 0x40bbea
lea ecx, [esp + 0x940]
push ecx
call dword [sym.imp.MSVCRT.dll__wtoi]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x1c]
add ecx, edx
add esp, 4
lea edx, [edi + ecx*4]
add ecx, edx
mov edx, dword [ebp + 0x10]
mov dword [edx + ecx*4 + 0xb618], eax
mov eax, dword [esp + 0x38]
inc edi
test eax, eax
jne 0x40bb90
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
test eax, eax
mov dword [esp + 0x18], ecx
jne 0x40bb42
lea eax, [esp + 0x140]
push 0x200
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x48]
push str.IPAddress
lea edx, [esp + 0x1c]
lea edi, [esi + 0xa4]
push ecx
push edx
mov word [esi], 0
push eax
mov word [edi], 0
call fcn.00405c40
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40bcf1
push 0x200
lea ecx, [esp + 0x544]
push 9
lea edx, [esp + 0x148]
push ecx
push edx
call fcn.00422ce0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x550]
push eax
call fcn.00424650
add esp, 0x14
dec eax
neg eax
sbb eax, eax
lea ecx, [esp + 0x540]
inc eax
jne 0x40bc9a
mov ecx, 0x439554
neg eax
sbb eax, eax
and eax, 0x1ff
inc eax
push eax
push ecx
push edi
call fcn.00422fc0
mov edx, dword [esp + 0x28]
push 0x200
lea ecx, [esp + 0x550]
push 9
push ecx
push edx
call fcn.00422ce0
mov dword [esp + 0x38], eax
push 0xa
lea eax, [esp + 0x560]
push 0
push eax
call dword [sym.imp.MSVCRT.dll_wcstol]
mov ecx, dword [esp + 0x44]
push 0x20
push 9
push esi
push ecx
mov word [edi + 0x40], ax
call fcn.00422ce0
add esp, 0x38
mov edi, dword [ebp + 0xc]
lea edx, [esi + 0xe6]
push 0x20
push edx
lea eax, [esp + 0x48]
push str.RequestString
lea ecx, [esp + 0x1c]
push eax
push ecx
push edi
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x158]
inc eax
push 0x200
add ebx, eax
push edx
lea eax, [esp + 0x60]
push str.ReqInterval
lea ecx, [esp + 0x34]
push eax
push ecx
push edi
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x60]
inc eax
push edx
add ebx, eax
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x178]
push 0x42bb14
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x60]
fmul qword [0x426348]
add esp, 0x40
call sub.MSVCRT.dll__ftol
xor edx, edx
test eax, eax
setl dl
dec edx
and eax, edx
mov dword [esi + 0x128], eax
fld qword [esp + 0x30]
fmul qword [0x426348]
call sub.MSVCRT.dll__ftol
xor ecx, ecx
lea edx, [esp + 0x140]
test eax, eax
setl cl
dec ecx
push 0x200
and eax, ecx
push edx
mov dword [esi + 0x12c], eax
lea eax, [esp + 0x48]
push str.TagDetect
lea ecx, [esp + 0x1c]
push eax
push ecx
push edi
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call fcn.00405c40
neg eax
sbb eax, eax
lea edx, [esp + 0x38]
inc eax
push edx
add ebx, eax
lea eax, [esi + 0x130]
push eax
push str._d_lf
lea ecx, [esp + 0x164]
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x48]
fmul qword [0x426348]
call sub.MSVCRT.dll__ftol
xor edx, edx
push 0x200
test eax, eax
setl dl
dec edx
lea ecx, [esp + 0x6c]
and eax, edx
lea edx, [esp + 0x3c]
mov dword [esi + 0x134], eax
lea eax, [esp + 0x16c]
push eax
push str.TagFilter
push ecx
push edx
push edi
call fcn.00405c40
add esp, 0x40
neg eax
sbb eax, eax
xor edi, edi
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40bed6
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x40bed6
cmp edi, 0xa
jge 0x40bed6
mov eax, dword [esp + 0x1c]
push 0x200
lea edx, [esp + 0x544]
push 0
push edx
push eax
call fcn.00422ce0
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x10]
add edx, edi
lea ecx, [esp + 0x550]
push 0x20
shl edx, 6
push ecx
lea ecx, [edx + eax + 0xb710]
push ecx
call fcn.00422fc0
mov eax, dword [esp + 0x38]
add esp, 0x1c
inc edi
test eax, eax
jne 0x40be85
lea edx, [esp + 0x140]
push 0x200
push edx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x48]
push str.AntFilter
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call fcn.00405c40
neg eax
sbb eax, eax
lea ecx, [esi + 0x3b8]
inc eax
lea edx, [esp + 0x158]
add ebx, eax
lea eax, [esi + 0x3bc]
push eax
push ecx
push str._d_d
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
add esp, 0x28
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x2c]
add eax, 0x30
inc edx
add edi, 0xf
add esi, 0x3c0
cmp eax, 0x1b0
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], edi
jle 0x40baa0
lea eax, [esp + 0x10]
push eax
call fcn.004047b0
add esp, 4
xor eax, eax
test ebx, ebx
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret