Function at 0x473830
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x5d6190
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x629560]
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.0044d9e0
mov edx, dword [0x649a98]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
mov esi, 0x401
sub eax, esi
or eax, ecx
jge 0x473899
push esi
mov ecx, 0x649a98
call fcn.00405360
mov edx, dword [0x649a98]
cmp dword [edx - 8], esi
jge 0x4738a8
push 0x80070057
call fcn.00404150
push 0x400
mov dword [edx - 0xc], esi
mov eax, dword [0x649a98]
push edx
push 0
mov byte [eax + 0x401], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [0x649a98]
test edx, edx
jne 0x4738d3
xor eax, eax
jmp 0x4738e5
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4738d8
sub eax, esi
js 0x47389e
cmp eax, dword [edx - 8]
jg 0x47389e
mov dword [edx - 0xc], eax
mov ecx, dword [0x649a98]
mov byte [ecx + eax], 0
mov edx, dword [0x649a98]
push 0x5c
push edx
call fcn.004f3288
add esp, 8
test eax, eax
jne 0x473911
or eax, 0xffffffff
jmp 0x473917
sub eax, dword [0x649a98]
push eax
lea eax, [esp + 0x18]
push eax
mov ecx, 0x649a98
call fcn.00404d30
push str.osd_
push eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x40], 0
call fcn.00404db0
add esp, 0xc
push eax
mov ecx, 0x649a98
mov byte [esp + 0x38], 1
call fcn.00404f90
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 0x473977
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 0x47399f
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 0x4739b7
cmp eax, 1
je 0x4739b7
cmp eax, 2
jne 0x4739be
xor ecx, ecx
jmp 0x4739c2
mov ecx, 1
jmp 0x4739c2
mov ecx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x8c]
cmp eax, 1
jne 0x4739f3
cmp ecx, eax
jne 0x4739e7
mov dword [ebp + 0x84], 0x2c0
mov dword [ebp + 0x88], 0x1e0
jmp 0x473a22
mov dword [ebp + 0x88], 0xf0
jmp 0x473a18
cmp ecx, 1
jne 0x473a0e
mov dword [ebp + 0x84], 0x2c0
mov dword [ebp + 0x88], 0x240
jmp 0x473a22
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 0x473af2
mov eax, dword [ebp + 0xd2c]
cmp eax, dword [ebp + 0xd24]
lea ebx, [ebp + 0xd24]
jle 0x473af2
mov ecx, dword [ebp + 0xd30]
cmp ecx, dword [ebp + 0xd28]
jle 0x473af2
lea esi, [ebp + 0xd38]
mov edi, esi
call fcn.00473d30
call fcn.00473cb0
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 0x473ad7
add eax, 3
push eax
push 0x1e0
jmp 0x473ae0
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 0x473b23
mov eax, dword [ebp + 0x1c4]
test eax, eax
je 0x473b23
cmp eax, ecx
je 0x473b23
cmp byte [ebp + 0x820], cl
je 0x473b23
cmp dword [ebp + 0x284], ecx
jne 0x473b39
push 0
push 0
push ebp
push 0x470fd0
push 0
push 0
call esi
mov dword [ebp + 0x7d40], eax
push 0
push 0
push ebp
push 0x470fe0
push 0
push 0
call esi
push 0
push 0
push ebp
push 0x470ff0
push 0
push 0
mov dword [ebp + 0x7d44], eax
call esi
cmp dword [ebp + 0x7d94], 0
mov dword [ebp + 0x7d4c], eax
je 0x473b8d
cmp byte [ebp + 0x823], 0
je 0x473b8d
push 0
push 0
push ebp
push 0x470fc0
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 0x473bbb
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [ebp + 0x7d00]
push eax
call edi
xor ebx, ebx
mov dword [ebp + 0x7d00], ebx
jmp 0x473bbd
xor ebx, ebx
mov eax, dword [ebp + 0x7d4c]
cmp eax, ebx
je 0x473bdb
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 0x473bf9
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 0x473c17
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 0x473c35
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.0044d9e0
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