Function at 0x471350
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d1170
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push edi
mov eax, dword [0x629560]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
xor eax, eax
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call fcn.004f4ccd
add esp, 4
cmp dword [esi + 0x8c], 1
jne 0x4713a3
mov edi, 0x280
mov ebx, 0x1e0
jmp 0x4713ad
mov edi, 0x2c0
mov ebx, 0x240
push 0x2c
lea eax, [esp + 0x34]
push 0
push eax
call fcn.004f9810
add esp, 0xc
push ebx
push edi
push 1
lea ebx, [esp + 0x3c]
call fcn.0048a240
add esp, 0xc
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov byte [esi + 0x2b2], 1
cmp byte [esi + 0x2b0], 0
je 0x471562
mov ecx, dword [esi + 0xd18]
push ecx
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_StartChannel_MJpeg_int_]
mov edi, dword [esp + 0x34]
add esp, 4
test eax, eax
jl 0x471595
mov edx, dword [esi + 0xd18]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push edi
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_GetVideo_MJpeg_unsigned_char___int___int___unsigned_long_int___int_]
add esp, 0x14
cmp eax, ebx
jl 0x471595
call fcn.004d4991
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x4715dd
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x6c], ebx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x605167
call fcn.0041c260
lea ecx, [esp + 0x24]
push ecx
push esi
call fcn.0044cd60
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 1
call fcn.00404f90
mov byte [esp + 0x68], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4714ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x10]
push 0x60d25c
push ebx
call fcn.004f5eba
mov edi, eax
add esp, 8
test edi, edi
je 0x4715e7
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x30]
push edi
push ecx
push 1
push edx
call fcn.004f64af
push edi
call fcn.004f61b8
lea eax, [ebx - 0x10]
add esp, 0x14
mov dword [esp + 0x68], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x471507
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esi + 0xd34], 0
je 0x471549
cmp dword [esi + 0x284], 0
je 0x471549
cmp byte [esi + 0x7d50], 0
je 0x471549
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov eax, ecx
sub eax, edx
cmp ecx, edx
jae 0x471537
add eax, 0x5265c00
cmp eax, 0x1770
jbe 0x471549
or dword [esi + 0x2b4], 8
mov dword [esp + 0x18], ecx
mov ecx, dword [esi + 0xd18]
push ecx
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_StopChannel_MJpeg_int_]
add esp, 4
mov byte [esi + 0x2b0], 0
xor ebx, ebx
mov eax, dword [esi + 0x2b4]
test al, 8
je 0x47157c
and eax, 0xfffffff7
mov dword [esi + 0x2b4], eax
mov byte [esi + 0x2b0], 1
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0x2b2], 0
jne 0x4713e3
mov edi, dword [esp + 0x30]
mov ecx, dword [esi + 0xd18]
push ecx
call dword [sym.imp.exp.dll_int___cdecl_JMVSDK_StopChannel_MJpeg_int_]
add esp, 4
cmp edi, ebx
je 0x4715b8
movzx edx, byte [edi - 1]
sub edi, edx
push edi
call fcn.004f2965
add esp, 4
mov byte [esi + 0x2b0], 0
mov byte [esi + 0x2b2], 0
mov eax, 1
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404150
add ebx, 0xfffffff0
mov dword [esp + 0x68], 0xffffffff
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x47160b
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret