Function at 0x5691e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x24c
push ebx
mov ebx, dword [esp + 0x258]
test ebx, ebx
je 0x5695a5
mov ecx, dword [ebx + 4]
push esi
mov esi, dword [ebx]
movzx eax, word [esi + 0x1e]
inc ecx
cmp ecx, eax
mov dword [esp + 0xc], esi
jge 0x569595
mov edx, dword [ebx + 0xc]
mov eax, dword [esi + 8]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x2e
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x569585
cmp dword [esp + 0x14], 0x2014b50
jne 0x569585
movzx eax, word [esp + 0x30]
movzx ecx, word [esp + 0x32]
movzx edx, word [esp + 0x34]
lea eax, [eax + eax + 0x32]
mov dword [esp + 0x44], eax
push ebp
add eax, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x50], eax
lea eax, [eax + edx*2 + 2]
push eax
push 0x42
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call ebp
mov esi, eax
test esi, esi
je 0x569573
mov ax, word [esp + 0x22]
mov word [esi], ax
mov cx, word [esp + 0x24]
mov word [esi + 2], cx
mov dx, word [esp + 0x26]
mov word [esi + 4], dx
mov ax, word [esp + 0x28]
mov word [esi + 6], ax
mov cx, word [esp + 0x2a]
mov word [esi + 8], cx
mov edx, dword [esp + 0x2c]
mov dword [esi + 0xc], edx
mov eax, dword [esp + 0x30]
mov dword [esi + 0x10], eax
mov ecx, dword [esp + 0x34]
mov dword [esi + 0x14], ecx
mov dx, word [esp + 0x38]
mov word [esi + 0x18], dx
mov ax, word [esp + 0x3a]
mov word [esi + 0x1a], ax
mov cx, word [esp + 0x3c]
mov word [esi + 0x1c], cx
mov edx, dword [esp + 0x46]
lea eax, [esi + 0x30]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], eax
mov ax, word [esp + 0x38]
test ax, ax
mov dword [esp + 0x10], 1
je 0x56940b
movzx ecx, ax
inc ecx
push ecx
push 0x42
call edi
push eax
call ebp
mov edi, eax
xor ebp, ebp
cmp edi, ebp
je 0x569405
movzx eax, word [esp + 0x38]
mov ecx, dword [esp + 0x14]
push ebp
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx + 8]
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x569405
cmp byte [edi], 0
mov dword [esp + 0x10], 1
mov eax, edi
lea ecx, [esp + 0x54]
je 0x569389
movzx ebx, word [esp + 0x38]
cmp ebp, ebx
jge 0x569382
movsx dx, byte [eax]
cmp dx, 0x2f
mov word [ecx], dx
jne 0x569376
mov word [ecx], 0x5c
mov dl, byte [eax + 1]
inc eax
add ecx, 2
inc ebp
test dl, dl
jne 0x569360
mov ebx, dword [esp + 0x264]
movzx eax, word [esp + 0x38]
mov edx, dword [esi + 0x24]
lea ecx, [esp + 0x54]
push ecx
push edx
mov word [esp + eax*2 + 0x5c], 0
call fcn.00404990
mov eax, dword [esp + 0x14]
test byte [eax + 0x10], 1
je 0x5693b9
mov ecx, dword [esi + 0x24]
push ecx
call sym.vidcap60.exe__SfGetFileNamePtrW_4
mov dword [esi + 0x24], eax
test edi, edi
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalHandle]
je 0x5693d7
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x569411
push esi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop ebp
pop esi
mov eax, 0x8004e008
pop ebx
add esp, 0x24c
ret 0xc
mov dword [esp + 0x10], ebp
jmp 0x5693b9
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalHandle]
cmp word [esp + 0x3a], 0
je 0x569445
mov edx, dword [esp + 0x4c]
lea eax, [esi + edx]
mov dword [esi + 0x28], eax
movzx edx, word [esp + 0x3a]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x10], eax
jmp 0x56944c
mov dword [esi + 0x28], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5693df
mov edx, dword [esp + 0x50]
lea eax, [esi + edx]
mov dword [esi + 0x2c], eax
mov ax, word [esp + 0x3c]
test ax, ax
je 0x5694fb
movzx ecx, ax
inc ecx
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
je 0x569566
movzx eax, word [esp + 0x3c]
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx + 8]
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x569566
mov ecx, dword [esi + 0x2c]
xor edx, edx
cmp byte [edi], dl
mov dword [esp + 0x10], 1
mov eax, edi
je 0x5694e3
movzx ebx, word [esp + 0x3c]
cmp edx, ebx
jge 0x5694dc
movsx bx, byte [eax]
inc eax
mov word [ecx], bx
mov bl, byte [eax]
add ecx, 2
inc edx
test bl, bl
jne 0x5694c1
mov ebx, dword [esp + 0x264]
test edi, edi
je 0x5694fb
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5693df
mov eax, dword [ebx + 4]
movzx edx, word [esp + 0x3a]
movzx ecx, word [esp + 0x3c]
inc eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0xc]
add edx, eax
mov dword [ebx + 8], eax
movzx eax, word [esp + 0x38]
add edx, ecx
lea ecx, [eax + edx + 0x2e]
mov eax, dword [esp + 0x268]
mov dword [ebx + 0xc], ecx
mov edx, dword [esi + 0x24]
push edx
push eax
call dword [0x5d2614]
add esp, 8
push esi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x24c
ret 0xc
mov dword [esp + 0x10], 0
jmp 0x5694e3
pop edi
pop ebp
pop esi
mov eax, 0x8007000e
pop ebx
add esp, 0x24c
ret 0xc
pop esi
mov eax, 0x8004e008
pop ebx
add esp, 0x24c
ret 0xc
pop esi
mov eax, 0x80070057
pop ebx
add esp, 0x24c
ret 0xc
mov eax, 0x80070057
pop ebx
add esp, 0x24c
ret 0xc