Function at 0x40d670
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.00406d10
add esp, 8
test eax, eax
jne 0x40d6a3
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.00408950
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.00408a80
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.00408950
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.00408a80
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 0x40d790
fld qword [esp + 0x20]
fmul qword [0x42a3e0]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x210], eax
mov eax, dword [esi + 0x214]
cmp eax, 1
jg 0x40d78a
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.00408950
fld qword [esp + 0x3c]
fmul qword [0x42a3c0]
fld qword [0x42a368]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40d7d9
fstp st(0)
fld qword [0x42a368]
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.00408950
fld qword [esp + 0x3c]
fmul qword [0x42a3c0]
fld qword [0x42a368]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40d82d
fstp st(0)
fld qword [0x42a368]
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.00408a80
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.00408950
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.00407660
add esp, 0x1c
test eax, eax
je 0x40d92a
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 0x40d8c8
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.00408a80
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.00408b60
lea ecx, [esp + 0x168]
push 0x104
lea edx, [esi + 0x738]
push ecx
push edx
call fcn.0041b690
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.00408a80
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.00408b60
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.00408a80
add esp, 0x28
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40da95
lea eax, [esp + 0x140]
mov dword [esp + 0x14], 0
test eax, eax
lea edi, [esp + 0x140]
je 0x40da95
lea ecx, [esi + 0x4e0]
mov dword [esp + 0x18], ecx
cmp word [edi], 0
je 0x40da95
cmp dword [esp + 0x14], 3
jge 0x40da95
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push edi
call fcn.0041b3b0
mov ecx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x550]
push 0x20
push eax
push ecx
call fcn.0041b690
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 0x40da42
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40db36
lea edx, [esp + 0x140]
mov dword [esp + 0x14], 0
test edx, edx
lea edi, [esp + 0x140]
je 0x40db36
add esi, 0x5a0
cmp word [edi], 0
je 0x40db36
cmp dword [esp + 0x14], 3
jge 0x40db36
push 0x200
lea eax, [esp + 0x544]
push 9
push eax
push edi
call fcn.0041b3b0
lea ecx, [esp + 0x550]
push 0x20
push ecx
push esi
mov edi, eax
call fcn.0041b690
mov edx, dword [esp + 0x30]
add esp, 0x1c
inc edx
add esi, 0x40
test edi, edi
mov dword [esp + 0x14], edx
jne 0x40daef
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.00408a80
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.00407660
add esp, 0x1c
test eax, eax
je 0x40df80
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40dc66
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.0041b3b0
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.0041b3b0
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.00408950
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.00408a80
add esp, 0x34
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40dce3
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40dd73
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 0x40dd73
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ddc8
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 0x40ddd4
cmp eax, 0xf
jge 0x40dde0
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and eax, ecx
jmp 0x40dde5
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40de44
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40df80
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 0x40deda
mov dword [esi + 0x88], 1
jmp 0x40df28
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40defc
mov dword [esi + 0x88], 2
jmp 0x40df28
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40df1e
mov dword [esi + 0x88], 3
jmp 0x40df28
mov dword [esi + 0x88], 0
fld qword [esp + 0x20]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40df49
fstp st(0)
fld qword [0x42a368]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xa0], eax
fld qword [esp + 0x30]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40df75
fstp st(0)
fld qword [0x42a368]
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 0x40db9f
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 0x42fd98
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.00407660
add esp, 0x1c
test eax, eax
je 0x40e3d1
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40e083
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.0041b3b0
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.0041b3b0
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.00408a80
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 0x40e133
lea ecx, [esp + 0x140]
lea esi, [esp + 0x140]
test ecx, ecx
je 0x40e133
cmp edi, 8
jge 0x40e133
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push esi
call fcn.0041b3b0
add esp, 0x10
cmp word [esp + 0x540], 0
mov esi, eax
je 0x40e11b
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 0x40e12e
mov dword [esp + 0x2c], edi
inc edi
test esi, esi
jne 0x40e0d4
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov esi, dword [ebp + 0x10]
xor eax, eax
cmp eax, edi
jge 0x40e15a
lea ecx, [edx + eax]
cmp dword [esi + ecx*4], 0
lea ecx, [esi + ecx*4]
jg 0x40e158
mov dword [ecx], 0xffffffff
jmp 0x40e166
cmp eax, edi
jle 0x40e166
lea ecx, [edx + eax]
mov dword [esi + ecx*4], 0
inc eax
cmp eax, 8
jl 0x40e140
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.00408a80
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 0x40e1bf
mov dword [esi + 0x3c], 1
jmp 0x40e1c6
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.00408a80
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 str._lf_lf
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x48]
fmul qword [0x42a3c0]
fld qword [0x42a368]
add esp, 0x28
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e250
fstp st(0)
fld qword [0x42a368]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x40], eax
fld qword [esp + 0x30]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e279
fstp st(0)
fld qword [0x42a368]
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.00408950
fld qword [esp + 0x3c]
fcomp qword [0x42a368]
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
je 0x40e2c1
xor eax, eax
jmp 0x40e379
fld qword [0x42a3c0]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x42a388]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x42a3d8]
add esp, 8
fnstsw ax
test ah, 1
jne 0x40e319
fld qword [0x42a3c0]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x42a388]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x42a3d0]
add esp, 8
fnstsw ax
test ah, 1
je 0x40e36e
fld qword [0x42a3c0]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x42a388]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x42a3d8]
add esp, 8
fnstsw ax
test ah, 1
je 0x40e34d
fld qword [0x42a3d8]
jmp 0x40e374
fld qword [0x42a3c0]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x42a388]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
jmp 0x40e374
fld qword [0x42a3d0]
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.00408950
fld qword [esp + 0x3c]
fmul qword [0x42a3c0]
fld qword [0x42a368]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40e3c5
fstp st(0)
fld qword [0x42a368]
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 0x40dfc2
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.00407660
add esp, 0x1c
test eax, eax
je 0x40ebb8
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40e4dc
push 0x200
lea edx, [esp + 0x544]
push 9
lea eax, [esp + 0x148]
push edx
push eax
call fcn.0041b3b0
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.0041b3b0
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.00408a80
mov edi, dword [sym.imp.MSVCRT.dll__wcsnicmp]
push 3
neg eax
sbb eax, eax
lea ecx, [esp + 0x15c]
inc eax
push 0x42e82c
push ecx
add ebx, eax
call edi
add esp, 0x24
test eax, eax
je 0x40e562
push 4
lea edx, [esp + 0x144]
push str.BASE
push edx
call edi
add esp, 0xc
test eax, eax
je 0x40e562
push 0x20
lea eax, [esi + 0x5c]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.0041b3b0
add esp, 0x10
mov dword [esi + 0x9c], 0
jmp 0x40e585
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.00408b60
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40e609
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
je 0x40e609
lea edx, [esi + 0xf4]
mov dword [esp + 0x18], edx
cmp edi, 0xa
jge 0x40e609
mov ecx, dword [esp + 0x18]
push 0x80
push 9
push ecx
push eax
call fcn.0041b3b0
mov edx, dword [esp + 0x28]
add esp, 0x10
inc edi
add edx, 0x100
test eax, eax
mov dword [esp + 0x18], edx
jne 0x40e5dc
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.00408a80
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.00408a80
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 str._lf_lf
push edx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x60]
fmul qword [0x42a3c0]
fld qword [0x42a368]
add esp, 0x40
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e6de
fstp st(0)
fld qword [0x42a368]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xcf4], eax
fld qword [esp + 0x30]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e70a
fstp st(0)
fld qword [0x42a368]
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40e7ad
lea edx, [esp + 0x140]
lea ecx, [esp + 0x140]
test edx, edx
mov dword [esp + 0x1c], ecx
je 0x40e7ad
cmp edi, 0xa
jge 0x40e7ad
mov ecx, dword [esp + 0x1c]
push 0x200
lea eax, [esp + 0x544]
push 0
push eax
push ecx
call fcn.0041b3b0
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 0x40e766
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40e907
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.0041b3b0
mov edi, eax
lea edx, [esi + 0xd06]
push 0x80
lea eax, [esp + 0x554]
push edx
push eax
call fcn.0041d4f0
push 0x200
lea ecx, [esp + 0x560]
push 9
push ecx
push edi
call fcn.0041b3b0
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.0041b3b0
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.0041b3b0
mov edi, dword [sym.imp.MSVCRT.dll__wcsicmp]
lea eax, [esp + 0x55c]
push 0x42e80c
push eax
call edi
add esp, 0x24
test eax, eax
je 0x40e8fd
lea ecx, [esp + 0x540]
push 0x42e804
push ecx
call edi
add esp, 8
test eax, eax
je 0x40e8fd
lea edx, [esp + 0x540]
push 0x42e800
push edx
call edi
add esp, 8
test eax, eax
je 0x40e8fd
mov dword [esi + 0xd90], 0
jmp 0x40e907
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.00408a80
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 0x40e99b
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.00408a80
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 0x40e9f6
cmp eax, 0xf
jge 0x40ea02
xor edx, edx
test eax, eax
setl dl
dec edx
and eax, edx
jmp 0x40ea07
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.00408a80
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.00408a80
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 0x40eae9
mov dword [esi + 0xdf0], 1
jmp 0x40eb59
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40eb0b
mov dword [esi + 0xdf0], 2
jmp 0x40eb59
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40eb2d
mov dword [esi + 0xdf0], 3
jmp 0x40eb59
lea eax, [esp + 0x540]
push 0x42fcec
push eax
call edi
add esp, 8
test eax, eax
jne 0x40eb4f
mov dword [esi + 0xdf0], 4
jmp 0x40eb59
mov dword [esi + 0xdf0], 0
cmp dword [esp + 0x18], 4
jle 0x40ebb8
fld qword [esp + 0x20]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40eb81
fstp st(0)
fld qword [0x42a368]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xe08], eax
fld qword [esp + 0x30]
fmul qword [0x42a3c0]
fld qword [0x42a368]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40ebad
fstp st(0)
fld qword [0x42a368]
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 0x40e41b
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.00407660
add esp, 0x1c
test eax, eax
je 0x40f086
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ed68
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], 1
test ecx, ecx
lea eax, [esp + 0x140]
je 0x40ed68
jmp 0x40eca6
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], 4
jg 0x40ed68
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push eax
call fcn.0041b3b0
add esp, 0x10
cmp word [esp + 0x540], 0
mov dword [esp + 0x1c], eax
je 0x40ed53
lea ecx, [esp + 0x540]
xor edi, edi
lea eax, [esp + 0x540]
test ecx, ecx
mov dword [esp + 0x38], eax
je 0x40ed53
cmp edi, 5
jg 0x40ed53
mov eax, dword [esp + 0x38]
push 0x80
lea edx, [esp + 0x944]
push 0x3b
push edx
push eax
call fcn.0041b3b0
add esp, 0x10
cmp word [esp + 0x940], 0
mov dword [esp + 0x38], eax
je 0x40ed4a
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 0x40ecf0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
test eax, eax
mov dword [esp + 0x18], ecx
jne 0x40eca2
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.00408a80
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ee51
push 0x200
lea ecx, [esp + 0x544]
push 9
lea edx, [esp + 0x148]
push ecx
push edx
call fcn.0041b3b0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x550]
push eax
call fcn.0041dd60
add esp, 0x14
dec eax
neg eax
sbb eax, eax
lea ecx, [esp + 0x540]
inc eax
jne 0x40edfa
mov ecx, 0x43e504
neg eax
sbb eax, eax
and eax, 0x1ff
inc eax
push eax
push ecx
push edi
call fcn.0041b690
mov edx, dword [esp + 0x28]
push 0x200
lea ecx, [esp + 0x550]
push 9
push ecx
push edx
call fcn.0041b3b0
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.0041b3b0
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.00408a80
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.00408a80
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 str._lf_lf
push ecx
call dword [sym.imp.MSVCRT.dll_swscanf]
fld qword [esp + 0x60]
fmul qword [0x42a3c0]
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 [0x42a3c0]
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.00408a80
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 [0x42a3c0]
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.00408a80
add esp, 0x40
neg eax
sbb eax, eax
xor edi, edi
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40f036
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x40f036
cmp edi, 0xa
jge 0x40f036
mov eax, dword [esp + 0x1c]
push 0x200
lea edx, [esp + 0x544]
push 0
push edx
push eax
call fcn.0041b3b0
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.0041b690
mov eax, dword [esp + 0x38]
add esp, 0x1c
inc edi
test eax, eax
jne 0x40efe5
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.00408a80
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 0x40ec00
lea eax, [esp + 0x10]
push eax
call fcn.004071a0
add esp, 4
xor eax, eax
test ebx, ebx
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret