Function at 0x4d7320
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x50
push ebx
push ebp
mov ebp, dword [esp + 0x64]
xor ebx, ebx
cmp ebp, ebx
push esi
push edi
jne 0x4d733e
lea eax, [ebx + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
mov eax, dword [esp + 0x68]
push eax
lea esi, [esp + 0x18]
call fcn.00407010
cmp dword [esp + 0x28], ebx
jne 0x4d739b
cmp dword [esp + 0x18], ebx
setne al
cmp al, bl
jne 0x4d739b
mov ebp, dword [esp + 0x20]
lea edi, [esp + 0x34]
call fcn.00401700
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov dword [esp + 0x34], ebx
je 0x4d7386
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x4d738f
call fcn.00457970
lea ebx, [esp + 0x14]
call fcn.00486bd0
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
mov edi, dword [esp + 0x64]
push edi
lea eax, [esp + 0x18]
mov byte [edi + 8], bl
call fcn.004d7690
mov esi, eax
cmp esi, ebx
jne 0x4d7531
test dword [edi + 0x10], 0xfffffffe
je 0x4d7672
lea esi, [esp + 0x38]
call fcn.004d9e00
mov edi, dword [esp + 0x40]
cmp edi, ebx
je 0x4d7404
mov esi, dword [esp + 0x3c]
shr esi, 1
push ebx
mov eax, esi
mov ecx, edi
call fcn.00487200
test eax, eax
jne 0x4d74ac
mov ecx, dword [esp + 0x38]
mov edx, dword [edi + 4]
push esi
push ecx
push edx
call fcn.0060d1b0
add esp, 0xc
mov dword [esp + 0x40], ebx
jmp 0x4d7430
mov ecx, dword [esp + 0x48]
cmp ecx, ebx
je 0x4d7430
mov eax, dword [esp + 0x3c]
shr eax, 1
je 0x4d7425
push ecx
push eax
mov eax, dword [esp + 0x40]
push 1
push eax
call fcn.00608896
add esp, 0x10
lea ebx, [esp + 0x44]
call fcn.00486bd0
xor ebx, ebx
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x4d744a
push eax
call fcn.0045da90
add esp, 4
and dword [esp + 0x3c], 1
mov dword [esp + 0x38], ebx
mov eax, 0xb
mov edi, str.Invalid
lea ecx, [esp + 0x6c]
mov dword [esp + 0x6c], ebx
call fcn.00459750
mov esi, dword [esp + 0x6c]
cmp dword [esp + 0x58], esi
je 0x4d74a3
lea edi, [esp + 0x58]
call fcn.00401700
cmp esi, ebx
mov dword [esp + 0x58], esi
je 0x4d74a3
movzx ecx, byte [esi]
cmp ecx, 0x80
jae 0x4d749a
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
cmp eax, 0xff
jne 0x4d74a3
lea eax, [esp + 0x58]
call fcn.00459380
lea edi, [esp + 0x6c]
call fcn.00401700
mov eax, 0xc
mov edi, str.MemChunk
lea ecx, [esp + 0x6c]
mov dword [esp + 0x40], ebp
mov dword [esp + 0x6c], ebx
call fcn.00459750
mov esi, dword [esp + 0x6c]
cmp dword [esp + 0x58], esi
je 0x4d7509
lea edi, [esp + 0x58]
call fcn.00401700
cmp esi, ebx
mov dword [esp + 0x58], esi
je 0x4d7509
movzx edx, byte [esi]
cmp edx, 0x80
jae 0x4d7500
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
cmp eax, 0xff
jne 0x4d7509
lea eax, [esp + 0x58]
call fcn.00459380
lea edi, [esp + 0x6c]
call fcn.00401700
cmp dword [esp + 0x40], ebx
jne 0x4d7546
cmp dword [esp + 0x48], ebx
setne al
cmp al, bl
jne 0x4d7546
mov esi, dword [esp + 0x50]
lea eax, [esp + 0x38]
push eax
call fcn.004d9cc0
lea eax, [esp + 0x14]
call fcn.00403de0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x18]
push edx
push eax
call fcn.004d7f10
mov esi, eax
cmp esi, ebx
je 0x4d757f
lea ecx, [esp + 0x38]
push ecx
call fcn.004d9cc0
lea eax, [esp + 0x14]
call fcn.00403de0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
lea eax, [esp + 0x14]
call fcn.00479270
mov edi, dword [esp + 0x40]
cmp edi, ebx
je 0x4d75c0
mov esi, dword [esp + 0x3c]
shr esi, 1
push ebx
mov eax, esi
mov ecx, edi
call fcn.00487200
test eax, eax
jne 0x4d7668
mov edx, dword [esp + 0x38]
mov eax, dword [edi + 4]
push esi
push edx
push eax
call fcn.0060d1b0
add esp, 0xc
mov dword [esp + 0x40], ebx
jmp 0x4d75ec
mov ecx, dword [esp + 0x48]
cmp ecx, ebx
je 0x4d75ec
mov eax, dword [esp + 0x3c]
shr eax, 1
je 0x4d75e1
push ecx
mov ecx, dword [esp + 0x3c]
push eax
push 1
push ecx
call fcn.00608896
add esp, 0x10
lea ebx, [esp + 0x44]
call fcn.00486bd0
xor ebx, ebx
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x4d7606
push eax
call fcn.0045da90
add esp, 4
and dword [esp + 0x3c], 1
mov dword [esp + 0x38], ebx
mov eax, 0xb
mov edi, str.Invalid
lea ecx, [esp + 0x64]
mov dword [esp + 0x64], ebx
call fcn.00459750
mov esi, dword [esp + 0x64]
cmp dword [esp + 0x58], esi
je 0x4d765f
lea edi, [esp + 0x58]
call fcn.00401700
cmp esi, ebx
mov dword [esp + 0x58], esi
je 0x4d765f
movzx edx, byte [esi]
cmp edx, 0x80
jae 0x4d7656
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
cmp eax, 0xff
jne 0x4d765f
lea eax, [esp + 0x58]
call fcn.00459380
lea edi, [esp + 0x64]
call fcn.00401700
lea eax, [esp + 0x38]
push eax
call fcn.004d9cc0
lea eax, [esp + 0x14]
call fcn.00403de0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret 0xc