Function at 0x4d0e20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x58cfe0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
cmp dword [esi + 0x29], 2
jne 0x4d0e4e
cmp byte [esi + 0x45], 0
jne 0x4d0e4e
mov eax, 0x18
xor ebx, ebx
jmp 0x4d0e58
mov eax, 8
mov ebx, 0x100
mov ecx, dword [edi + 0x29]
lea edx, [ebx*4 + 0x36]
imul ecx, dword [esi + 0x56]
xorps xmm0, xmm0
mov dword [ebp - 0x40], eax
movq qword [ebp - 0x14], xmm0
movups xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 0xc], 0
add ecx, edx
mov word [ebp - 8], 0
mov eax, ecx
mov byte [ebp - 0x12], cl
sar eax, 8
mov byte [ebp - 0x11], al
mov eax, ecx
sar eax, 0x10
mov byte [ebp - 0x10], al
mov eax, edx
sar eax, 8
mov byte [ebp - 9], al
mov eax, edx
sar eax, 0x10
mov byte [ebp - 8], al
movzx eax, byte [esi + 0x52]
mov byte [ebp - 0x38], al
movzx eax, byte [esi + 0x53]
mov byte [ebp - 0x37], al
movzx eax, byte [esi + 0x54]
mov byte [ebp - 0x36], al
movzx eax, byte [esi + 0x55]
mov byte [ebp - 0x35], al
movzx eax, byte [esi + 0x56]
mov byte [ebp - 0x34], al
movzx eax, byte [esi + 0x57]
mov byte [ebp - 0x33], al
movzx eax, byte [esi + 0x58]
mov byte [ebp - 0x32], al
movzx eax, byte [esi + 0x59]
mov byte [ebp - 0x31], al
mov eax, dword [ebp - 0x40]
sar ecx, 0x18
mov byte [ebp - 0xa], dl
sar edx, 0x18
mov byte [ebp - 0x2e], al
sar eax, 8
cmp byte [esi + 0xf7], 2
movups xmmword [ebp - 0x2c], xmm0
mov word [ebp - 0x14], 0x4d42
movq qword [ebp - 0x1c], xmm0
mov byte [ebp - 0xf], cl
mov byte [ebp - 7], dl
mov word [ebp - 0x3c], 0x28
mov word [ebp - 0x30], 1
mov byte [ebp - 0x2d], al
jne 0x4d0f78
movsx eax, byte [esi + 0xf8]
imul eax, eax, 0x64
mov byte [ebp - 0x24], al
movzx eax, word [esi + 0xf8]
imul ecx, eax, 0x64
mov eax, ecx
sar eax, 8
mov byte [ebp - 0x23], al
mov eax, ecx
sar eax, 0x10
mov byte [ebp - 0x22], al
movsx eax, byte [esi + 0xfa]
imul eax, eax, 0x64
sar ecx, 0x18
mov byte [ebp - 0x21], cl
mov byte [ebp - 0x20], al
movzx eax, word [esi + 0xfa]
imul ecx, eax, 0x64
mov eax, ecx
sar eax, 8
mov byte [ebp - 0x1f], al
mov eax, ecx
sar eax, 0x10
sar ecx, 0x18
mov byte [ebp - 0x1e], al
mov byte [ebp - 0x1d], cl
mov eax, ebx
mov byte [ebp - 0x1c], bl
sar eax, 8
mov byte [ebp - 0x1b], al
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x4d0fa8
mov eax, dword [edi + 0x10]
movups xmm0, xmmword [ebp - 0x3c]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 0x2c]
movups xmmword [eax + 0x10], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [eax + 0x20], xmm0
jmp 0x4d0ffc
push eax
push 0xe
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.0051d101
add esp, 0x10
cmp eax, 0xe
je 0x4d0fd1
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x25
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
push dword [edi + 0xc]
lea eax, [ebp - 0x3c]
push 0x28
push 1
push eax
call fcn.0051d101
add esp, 0x10
cmp eax, 0x28
je 0x4d0ffc
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x25
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
test ebx, ebx
jle 0x4d100d
push 4
push ebx
push edi
push esi
call fcn.004d1020
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00507257
mov esp, ebp
pop ebp
ret