Function at 0x473a90
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x5d6480
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x628560]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3c]
mov esi, ebp
mov dword [ebp + 0x2ac], 1
call fcn.0044dbf0
mov edx, dword [0x648ab0]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
mov esi, 0x401
sub eax, esi
or eax, ecx
jge 0x473af9
push esi
mov ecx, 0x648ab0
call fcn.00405260
mov edx, dword [0x648ab0]
cmp dword [edx - 8], esi
jge 0x473b08
push 0x80070057
call fcn.00404150
push 0x400
mov dword [edx - 0xc], esi
mov eax, dword [0x648ab0]
push edx
push 0
mov byte [eax + 0x401], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [0x648ab0]
test edx, edx
jne 0x473b33
xor eax, eax
jmp 0x473b45
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x473b38
sub eax, esi
js 0x473afe
cmp eax, dword [edx - 8]
jg 0x473afe
mov dword [edx - 0xc], eax
mov ecx, dword [0x648ab0]
mov byte [ecx + eax], 0
mov edx, dword [0x648ab0]
push 0x5c
push edx
call fcn.004f35e7
add esp, 8
test eax, eax
jne 0x473b71
or eax, 0xffffffff
jmp 0x473b77
sub eax, dword [0x648ab0]
push eax
lea eax, [esp + 0x18]
push eax
mov ecx, 0x648ab0
call fcn.00404c40
push str.osd_
push eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x40], 0
call fcn.00404cc0
add esp, 0xc
push eax
mov ecx, 0x648ab0
mov byte [esp + 0x38], 1
call fcn.00404ec0
mov byte [esp + 0x34], 0
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x473bd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x34], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x473bff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x1c4]
test eax, eax
je 0x473c17
cmp eax, 1
je 0x473c17
cmp eax, 2
jne 0x473c1e
xor ecx, ecx
jmp 0x473c22
mov ecx, 1
jmp 0x473c22
mov ecx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x8c]
cmp eax, 1
jne 0x473c53
cmp ecx, eax
jne 0x473c47
mov dword [ebp + 0x84], 0x2c0
mov dword [ebp + 0x88], 0x1e0
jmp 0x473c82
mov dword [ebp + 0x88], 0xf0
jmp 0x473c78
cmp ecx, 1
jne 0x473c6e
mov dword [ebp + 0x84], 0x2c0
mov dword [ebp + 0x88], 0x240
jmp 0x473c82
mov dword [ebp + 0x88], 0x120
mov dword [ebp + 0x84], 0x160
mov edx, dword [ebp + 0xd18]
push edx
mov edx, dword [ebp + 0x18c]
push edx
mov edx, dword [ebp + 0x188]
push edx
mov edx, dword [ebp + 0x184]
push edx
mov edx, dword [ebp + 0x180]
push edx
mov edx, dword [ebp + 0x198]
push edx
push ecx
push eax
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_ConfigChannel_enum_VIDEOFORMAT__enum_VIDEORESOLUTION__unsigned_long_int__int__int__int__int__int_]
add esp, 0x20
cmp dword [ebp + 0x284], 0
je 0x473d52
mov eax, dword [ebp + 0xd2c]
cmp eax, dword [ebp + 0xd24]
lea ebx, [ebp + 0xd24]
jle 0x473d52
mov ecx, dword [ebp + 0xd30]
cmp ecx, dword [ebp + 0xd28]
jle 0x473d52
lea esi, [ebp + 0xd38]
mov edi, esi
call fcn.00473f90
call fcn.00473f10
cmp dword [ebp + 0x8c], 1
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xd20]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0xd18]
lea ecx, [esp + 0x18]
jne 0x473d37
add eax, 3
push eax
push 0x1e0
jmp 0x473d40
add eax, 8
push eax
push 0x240
push 0x2c0
push 1
push ecx
push edx
call dword [sym.imp.exp.dll_void___cdecl_JMVSDK_SetMotionDetect_int__struct_tagRECT___int__int__int__int_]
add esp, 0x18
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, 1
cmp dword [ebp + 0x1bc], ecx
je 0x473d83
mov eax, dword [ebp + 0x1c4]
test eax, eax
je 0x473d83
cmp eax, ecx
je 0x473d83
cmp byte [ebp + 0x820], cl
je 0x473d83
cmp dword [ebp + 0x284], ecx
jne 0x473d99
push 0
push 0
push ebp
push 0x471200
push 0
push 0
call esi
mov dword [ebp + 0x7d40], eax
push 0
push 0
push ebp
push 0x471210
push 0
push 0
call esi
push 0
push 0
push ebp
push 0x471220
push 0
push 0
mov dword [ebp + 0x7d44], eax
call esi
cmp dword [ebp + 0x7d94], 0
mov dword [ebp + 0x7d4c], eax
je 0x473ded
cmp byte [ebp + 0x823], 0
je 0x473ded
push 0
push 0
push ebp
push 0x4711f0
push 0
push 0
call esi
mov dword [ebp + 0x7d00], eax
mov eax, dword [ebp + 0x7d00]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x473e1b
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [ebp + 0x7d00]
push eax
call edi
xor ebx, ebx
mov dword [ebp + 0x7d00], ebx
jmp 0x473e1d
xor ebx, ebx
mov eax, dword [ebp + 0x7d4c]
cmp eax, ebx
je 0x473e3b
push 0xffffffffffffffff
push eax
call esi
mov ecx, dword [ebp + 0x7d4c]
push ecx
call edi
mov dword [ebp + 0x7d4c], ebx
mov eax, dword [ebp + 0x7d48]
cmp eax, ebx
je 0x473e59
push 0xffffffffffffffff
push eax
call esi
mov edx, dword [ebp + 0x7d48]
push edx
call edi
mov dword [ebp + 0x7d48], ebx
mov eax, dword [ebp + 0x7d44]
cmp eax, ebx
je 0x473e77
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [ebp + 0x7d44]
push eax
call edi
mov dword [ebp + 0x7d44], ebx
mov eax, dword [ebp + 0x7d40]
cmp eax, ebx
je 0x473e95
push 0xffffffffffffffff
push eax
call esi
mov ecx, dword [ebp + 0x7d40]
push ecx
call edi
mov dword [ebp + 0x7d40], ebx
mov edx, dword [ebp + 0xd18]
push edx
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_CloseChannel_int_]
add esp, 4
mov esi, ebp
mov dword [ebp + 0x2ac], ebx
call fcn.0044dbf0
mov eax, 1
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4