Function at 0x40d340
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.00406a40
add esp, 8
test eax, eax
jne 0x40d373
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.00408670
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.004087a0
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.00408670
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.004087a0
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 0x40d460
fld qword [esp + 0x20]
fmul qword [0x44e4c8]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x210], eax
mov eax, dword [esi + 0x214]
cmp eax, 1
jg 0x40d45a
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.00408670
fld qword [esp + 0x3c]
fmul qword [0x44e4a8]
fld qword [0x44e440]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40d4a9
fstp st(0)
fld qword [0x44e440]
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.00408670
fld qword [esp + 0x3c]
fmul qword [0x44e4a8]
fld qword [0x44e440]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40d4fd
fstp st(0)
fld qword [0x44e440]
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.004087a0
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.00408670
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 0x45468c
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.00407390
add esp, 0x1c
test eax, eax
je 0x40d5fa
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 0x40d598
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.004087a0
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.00408880
lea ecx, [esp + 0x168]
push 0x104
lea edx, [esi + 0x738]
push ecx
push edx
call fcn.00438940
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.004087a0
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.00408880
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.004087a0
add esp, 0x28
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40d765
lea eax, [esp + 0x140]
mov dword [esp + 0x14], 0
test eax, eax
lea edi, [esp + 0x140]
je 0x40d765
lea ecx, [esi + 0x4e0]
mov dword [esp + 0x18], ecx
cmp word [edi], 0
je 0x40d765
cmp dword [esp + 0x14], 3
jge 0x40d765
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push edi
call fcn.00438680
mov ecx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x550]
push 0x20
push eax
push ecx
call fcn.00438940
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 0x40d712
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40d806
lea edx, [esp + 0x140]
mov dword [esp + 0x14], 0
test edx, edx
lea edi, [esp + 0x140]
je 0x40d806
add esi, 0x5a0
cmp word [edi], 0
je 0x40d806
cmp dword [esp + 0x14], 3
jge 0x40d806
push 0x200
lea eax, [esp + 0x544]
push 9
push eax
push edi
call fcn.00438680
lea ecx, [esp + 0x550]
push 0x20
push ecx
push esi
mov edi, eax
call fcn.00438940
mov edx, dword [esp + 0x30]
add esp, 0x1c
inc edx
add esi, 0x40
test edi, edi
mov dword [esp + 0x14], edx
jne 0x40d7bf
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.004087a0
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 0x45468c
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.00407390
add esp, 0x1c
test eax, eax
je 0x40dc50
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40d936
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00438680
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.00438680
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.00408670
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.004087a0
add esp, 0x34
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40d9b3
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40da43
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 0x40da43
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40da98
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 0x40daa4
cmp eax, 0xf
jge 0x40dab0
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and eax, ecx
jmp 0x40dab5
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40db14
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40dc50
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 0x40dbaa
mov dword [esi + 0x88], 1
jmp 0x40dbf8
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40dbcc
mov dword [esi + 0x88], 2
jmp 0x40dbf8
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40dbee
mov dword [esi + 0x88], 3
jmp 0x40dbf8
mov dword [esi + 0x88], 0
fld qword [esp + 0x20]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40dc19
fstp st(0)
fld qword [0x44e440]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xa0], eax
fld qword [esp + 0x30]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40dc45
fstp st(0)
fld qword [0x44e440]
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 0x40d86f
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 0x455430
push 0x45468c
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.00407390
add esp, 0x1c
test eax, eax
je 0x40e0a1
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40dd53
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00438680
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.00438680
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.004087a0
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 0x40de03
lea ecx, [esp + 0x140]
lea esi, [esp + 0x140]
test ecx, ecx
je 0x40de03
cmp edi, 8
jge 0x40de03
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push esi
call fcn.00438680
add esp, 0x10
cmp word [esp + 0x540], 0
mov esi, eax
je 0x40ddeb
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 0x40ddfe
mov dword [esp + 0x2c], edi
inc edi
test esi, esi
jne 0x40dda4
mov edx, dword [esp + 0x18]
mov esi, dword [ebp + 0x10]
mov edi, dword [esp + 0x2c]
xor eax, eax
cmp eax, edi
jge 0x40de2a
lea ecx, [edx + eax]
cmp dword [esi + ecx*4], 0
lea ecx, [esi + ecx*4]
jg 0x40de28
mov dword [ecx], 0xffffffff
jmp 0x40de36
cmp eax, edi
jle 0x40de36
lea ecx, [edx + eax]
mov dword [esi + ecx*4], 0
inc eax
cmp eax, 8
jl 0x40de10
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.004087a0
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 0x40de8f
mov dword [esi + 0x3c], 1
jmp 0x40de96
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.004087a0
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 [0x44e4a8]
fld qword [0x44e440]
add esp, 0x28
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40df20
fstp st(0)
fld qword [0x44e440]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x40], eax
fld qword [esp + 0x30]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40df49
fstp st(0)
fld qword [0x44e440]
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.00408670
fld qword [esp + 0x3c]
fcomp qword [0x44e440]
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
je 0x40df91
xor eax, eax
jmp 0x40e049
fld qword [0x44e4a8]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x44e450]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x44e4c0]
add esp, 8
fnstsw ax
test ah, 1
jne 0x40dfe9
fld qword [0x44e4a8]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x44e450]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x44e4b8]
add esp, 8
fnstsw ax
test ah, 1
je 0x40e03e
fld qword [0x44e4a8]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x44e450]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
fcomp qword [0x44e4c0]
add esp, 8
fnstsw ax
test ah, 1
je 0x40e01d
fld qword [0x44e4c0]
jmp 0x40e044
fld qword [0x44e4a8]
fdiv qword [esp + 0x20]
sub esp, 8
fadd qword [0x44e450]
fstp qword [esp]
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
jmp 0x40e044
fld qword [0x44e4b8]
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.00408670
fld qword [esp + 0x3c]
fmul qword [0x44e4a8]
fld qword [0x44e440]
add esp, 0x1c
neg eax
sbb eax, eax
fcomp st(1)
inc eax
add ebx, eax
fnstsw ax
test ah, 0x41
jne 0x40e095
fstp st(0)
fld qword [0x44e440]
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 0x40dc92
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 0x45468c
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.00407390
add esp, 0x1c
test eax, eax
je 0x40e888
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40e1ac
push 0x200
lea edx, [esp + 0x544]
push 9
lea eax, [esp + 0x148]
push edx
push eax
call fcn.00438680
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.00438680
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.004087a0
mov edi, dword [sym.imp.MSVCRT.dll__wcsnicmp]
push 3
neg eax
sbb eax, eax
lea ecx, [esp + 0x15c]
inc eax
push 0x453ebc
push ecx
add ebx, eax
call edi
add esp, 0x24
test eax, eax
je 0x40e232
push 4
lea edx, [esp + 0x144]
push str.BASE
push edx
call edi
add esp, 0xc
test eax, eax
je 0x40e232
push 0x20
lea eax, [esi + 0x5c]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00438680
add esp, 0x10
mov dword [esi + 0x9c], 0
jmp 0x40e255
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.00408880
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40e2d9
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
je 0x40e2d9
lea edx, [esi + 0xf4]
mov dword [esp + 0x18], edx
cmp edi, 0xa
jge 0x40e2d9
mov ecx, dword [esp + 0x18]
push 0x80
push 9
push ecx
push eax
call fcn.00438680
mov edx, dword [esp + 0x28]
add esp, 0x10
inc edi
add edx, 0x100
test eax, eax
mov dword [esp + 0x18], edx
jne 0x40e2ac
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.004087a0
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.004087a0
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 [0x44e4a8]
fld qword [0x44e440]
add esp, 0x40
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e3ae
fstp st(0)
fld qword [0x44e440]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xcf4], eax
fld qword [esp + 0x30]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e3da
fstp st(0)
fld qword [0x44e440]
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40e47d
lea edx, [esp + 0x140]
lea ecx, [esp + 0x140]
test edx, edx
mov dword [esp + 0x1c], ecx
je 0x40e47d
cmp edi, 0xa
jge 0x40e47d
mov ecx, dword [esp + 0x1c]
push 0x200
lea eax, [esp + 0x544]
push 0
push eax
push ecx
call fcn.00438680
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 0x40e436
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40e5d7
push 0x200
lea eax, [esp + 0x544]
push 9
lea ecx, [esp + 0x148]
push eax
push ecx
call fcn.00438680
mov edi, eax
lea edx, [esi + 0xd06]
push 0x80
lea eax, [esp + 0x554]
push edx
push eax
call fcn.0043a790
push 0x200
lea ecx, [esp + 0x560]
push 9
push ecx
push edi
call fcn.00438680
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.00438680
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.00438680
mov edi, dword [sym.imp.MSVCRT.dll__wcsicmp]
lea eax, [esp + 0x55c]
push 0x453e9c
push eax
call edi
add esp, 0x24
test eax, eax
je 0x40e5cd
lea ecx, [esp + 0x540]
push 0x453e94
push ecx
call edi
add esp, 8
test eax, eax
je 0x40e5cd
lea edx, [esp + 0x540]
push 0x453e90
push edx
call edi
add esp, 8
test eax, eax
je 0x40e5cd
mov dword [esi + 0xd90], 0
jmp 0x40e5d7
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.004087a0
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 0x40e66b
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.004087a0
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 0x40e6c6
cmp eax, 0xf
jge 0x40e6d2
xor edx, edx
test eax, eax
setl dl
dec edx
and eax, edx
jmp 0x40e6d7
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.004087a0
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.004087a0
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 0x40e7b9
mov dword [esi + 0xdf0], 1
jmp 0x40e829
lea ecx, [esp + 0x540]
push str.FALL
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40e7db
mov dword [esi + 0xdf0], 2
jmp 0x40e829
lea edx, [esp + 0x540]
push str.CHANGE
push edx
call edi
add esp, 8
test eax, eax
jne 0x40e7fd
mov dword [esi + 0xdf0], 3
jmp 0x40e829
lea eax, [esp + 0x540]
push 0x455384
push eax
call edi
add esp, 8
test eax, eax
jne 0x40e81f
mov dword [esi + 0xdf0], 4
jmp 0x40e829
mov dword [esi + 0xdf0], 0
cmp dword [esp + 0x18], 4
jle 0x40e888
fld qword [esp + 0x20]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e851
fstp st(0)
fld qword [0x44e440]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0xe08], eax
fld qword [esp + 0x30]
fmul qword [0x44e4a8]
fld qword [0x44e440]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40e87d
fstp st(0)
fld qword [0x44e440]
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 0x40e0eb
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, pe_nt_image_headers32
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
push edx
push str.RfID
lea eax, [esp + 0x48]
push 0x45468c
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.00407390
add esp, 0x1c
test eax, eax
je 0x40ed56
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40ea38
lea ecx, [esp + 0x140]
mov dword [esp + 0x18], 1
test ecx, ecx
lea eax, [esp + 0x140]
je 0x40ea38
jmp 0x40e976
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], 4
jg 0x40ea38
push 0x200
lea edx, [esp + 0x544]
push 9
push edx
push eax
call fcn.00438680
add esp, 0x10
cmp word [esp + 0x540], 0
mov dword [esp + 0x1c], eax
je 0x40ea23
lea ecx, [esp + 0x540]
xor edi, edi
lea eax, [esp + 0x540]
test ecx, ecx
mov dword [esp + 0x38], eax
je 0x40ea23
cmp edi, 5
jg 0x40ea23
mov eax, dword [esp + 0x38]
push 0x80
lea edx, [esp + 0x944]
push 0x3b
push edx
push eax
call fcn.00438680
add esp, 0x10
cmp word [esp + 0x940], 0
mov dword [esp + 0x38], eax
je 0x40ea1a
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 0x40e9c0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
test eax, eax
mov dword [esp + 0x18], ecx
jne 0x40e972
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.004087a0
add esp, 0x18
neg eax
sbb eax, eax
inc eax
add ebx, eax
cmp word [esp + 0x140], 0
je 0x40eb21
push 0x200
lea ecx, [esp + 0x544]
push 9
lea edx, [esp + 0x148]
push ecx
push edx
call fcn.00438680
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x550]
push eax
call fcn.0043b000
add esp, 0x14
dec eax
neg eax
sbb eax, eax
lea ecx, [esp + 0x540]
inc eax
jne 0x40eaca
mov ecx, 0x464cf4
neg eax
sbb eax, eax
and eax, 0x1ff
inc eax
push eax
push ecx
push edi
call fcn.00438940
mov edx, dword [esp + 0x28]
push 0x200
lea ecx, [esp + 0x550]
push 9
push ecx
push edx
call fcn.00438680
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.00438680
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.004087a0
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.004087a0
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 [0x44e4a8]
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 [0x44e4a8]
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.004087a0
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 [0x44e4a8]
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.004087a0
add esp, 0x40
neg eax
sbb eax, eax
xor edi, edi
inc eax
add ebx, eax
cmp word [esp + 0x140], di
je 0x40ed06
lea ecx, [esp + 0x140]
lea eax, [esp + 0x140]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x40ed06
cmp edi, 0xa
jge 0x40ed06
mov eax, dword [esp + 0x1c]
push 0x200
lea edx, [esp + 0x544]
push 0
push edx
push eax
call fcn.00438680
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.00438940
mov eax, dword [esp + 0x38]
add esp, 0x1c
inc edi
test eax, eax
jne 0x40ecb5
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.004087a0
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 0x40e8d0
lea eax, [esp + 0x10]
push eax
call fcn.00406ed0
add esp, 4
xor eax, eax
test ebx, ebx
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret