Function at 0x55d720
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x2c]
cmp edi, esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], esi
mov dword [esp + 8], esi
mov dword [esp + 0x1c], esi
jne 0x55d750
pop edi
mov eax, 0x80004005
pop esi
add esp, 0x18
ret 0xc
mov eax, dword [esp + 0x28]
cmp eax, esi
push ebx
jne 0x55d761
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x55d769
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
mov ebx, ecx
xor ecx, ecx
cmp ebx, esi
jbe 0x55d793
mov edx, dword [eax + 8]
mov eax, dword [edx]
cmp eax, esi
je 0x55d7bf
mov eax, dword [eax + 4]
and eax, 0xf00000
cmp eax, 0x200000
jne 0x55d78b
inc dword [esp + 0x10]
inc ecx
add edx, 4
cmp ecx, ebx
jb 0x55d772
push ebp
mov ebp, dword [esp + 0x2c]
push esi
lea ecx, [esp + 0x1c]
push ecx
push 2
lea edx, [esp + 0x20]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x55d7cd
pop ebp
pop ebx
pop edi
mov eax, 0x8004e009
pop esi
add esp, 0x18
ret 0xc
pop ebx
pop edi
mov eax, 0x80004005
pop esi
add esp, 0x18
ret 0xc
movzx eax, word [esp + 0x14]
mov edx, dword [edi]
lea eax, [eax + eax*2]
lea ecx, [eax*4 + 6]
add edx, ecx
test ebx, ebx
mov dword [edi], edx
jbe 0x55d822
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 8]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x55d94b
mov ecx, dword [eax + 4]
and ecx, 0xf00000
cmp ecx, 0x200000
jne 0x55d81d
mov ecx, dword [esp + 0x20]
push edi
push eax
push ebp
call sym.vidcap60.exe_private:_long_int___thiscall_CSfExifMetaDataHelper::WriteIFDEntry_void___struct_SFMETA_SUM_TAG___unsigned_long_int__
test eax, eax
jl 0x55d941
inc esi
cmp esi, ebx
jb 0x55d7e6
push 0
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x38]
push eax
push ebp
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x55d7b0
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
xor ebx, ebx
test eax, eax
jbe 0x55d921
jmp 0x55d860
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + 8]
mov esi, dword [edx + ebx*4]
test esi, esi
je 0x55d95a
mov eax, dword [esi + 4]
and eax, 0xf00000
cmp eax, 0x200000
jne 0x55d914
mov eax, dword [esp + 0x10]
test eax, eax
je 0x55d8ad
push eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [esp + 0x10]
push ecx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x20]
push 0
push 0
push 0
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x20]
push eax
push esi
call sym.vidcap60.exe_private:_long_int___thiscall_CSfExifMetaDataHelper::CreateIFDEntryData_struct_SFMETA_SUM_TAG___unsigned_char____unsigned_long_int___unsigned_short_int___unsigned_short_int___unsigned_long_int__
mov esi, eax
test esi, esi
jl 0x55d923
mov esi, dword [esp + 0x24]
cmp esi, 4
jbe 0x55d914
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push esi
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x55d961
test esi, 1
je 0x55d914
push 0
lea eax, [esp + 0x1c]
push eax
push 1
lea ecx, [esp + 0x40]
push ecx
push ebp
mov byte [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x55d961
mov eax, dword [esp + 0x1c]
inc ebx
cmp ebx, eax
jb 0x55d860
xor esi, esi
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x55d93f
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x18
ret 0xc
pop ebp
pop ebx
pop edi
mov eax, 0x80004005
pop esi
add esp, 0x18
ret 0xc
mov esi, 0x80004005
jmp 0x55d923
mov esi, 0x8004e009
jmp 0x55d923