Function at 0x413740
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [esi + 0x40]
push ebx
push edi
lea edi, [esi + 0x40]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
cmp eax, ebx
je 0x41398f
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
push eax
call edx
mov edx, dword [ebp + 8]
mov eax, dword [edi]
add edx, edx
add edx, edx
mov dword [esi + 0x48], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
cmp dword [esi + 0x64], ebx
jne 0x413799
mov eax, dword [edi]
cmp eax, ebx
je 0x41398f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi], ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ebx
call dword [sym.imp.MFPlat.DLL_MFCreateSample]
mov eax, dword [ebp - 0xc]
mov edx, dword [edi]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xa8]
call eax
mov eax, dword [edi]
cmp eax, ebx
je 0x4137c7
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi], ebx
mov edx, dword [ebp - 0xc]
mov eax, dword [esi + 0x64]
mov ecx, dword [eax]
push ebx
push edx
push ebx
push eax
mov eax, dword [ecx + 0x60]
call eax
xor eax, eax
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.MFPlat.DLL_MFCreateSample]
test eax, eax
je 0x4137fb
push ebx
call dword [sym.imp.MSVCR100.dll_exit]
mov edx, dword [esi + 0x94]
imul edx, dword [ebp + 8]
push edi
add edx, edx
push edx
call dword [sym.imp.MFPlat.DLL_MFCreateMemoryBuffer]
test eax, eax
je 0x41381a
push ebx
call dword [sym.imp.MSVCR100.dll_exit]
mov eax, dword [ebp - 0x24]
mov edx, dword [edi]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xa8]
call eax
mov eax, dword [esi + 0x64]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp - 0x28]
push edx
push 1
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov ecx, dword [eax]
push ebx
push eax
mov eax, dword [ecx + 0x64]
call eax
test eax, eax
je 0x413855
push ebx
call dword [sym.imp.MSVCR100.dll_exit]
cmp dword [esi + 0x50], ebx
je 0x41398f
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push eax
mov eax, dword [ecx + 0xa4]
call eax
mov eax, dword [ebp - 8]
lea edx, [ebp - 4]
mov dword [ebp - 4], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
mov eax, dword [esi + 0x58]
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
mov ecx, dword [esi + 0x98]
mov eax, 0x92492493
imul ecx
mov eax, dword [ebp - 4]
add edx, ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp dword [ebp - 0x10], ecx
jbe 0x4138cb
mov ecx, dword [esi + 0x94]
xor edx, edx
div ecx
lea eax, [eax + eax*2]
shr eax, 2
imul eax, ecx
mov dword [ebp - 4], eax
lea edx, [ebp - 0x14]
push edx
xor edx, edx
div dword [esi + 0x94]
mov ecx, dword [esi + 0x50]
mov ecx, dword [ecx]
push eax
mov eax, dword [esi + 0x50]
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jne 0x413938
mov eax, dword [ebp - 8]
push ebx
push ebx
lea edx, [ebp + 8]
mov dword [ebp + 8], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
push ecx
push edx
push eax
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
add esp, 0xc
push eax
call edx
mov eax, dword [esi + 0x50]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
xor edx, edx
div dword [esi + 0x94]
mov edx, dword [ecx + 0x10]
push ebx
push eax
mov eax, dword [esi + 0x50]
push eax
call edx
mov eax, dword [ebp - 8]
cmp eax, ebx
je 0x41394a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 8], ebx
cmp byte [esi + 0x3c], bl
jne 0x41395e
mov eax, dword [esi + 0x58]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
push eax
call edx
mov byte [esi + 0x3c], 1
mov eax, dword [edi]
cmp eax, ebx
je 0x41396e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi], ebx
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x413980
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x41398f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4