Function at 0x4f2ec0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push 1
lea edx, [ebp - 0xc]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4f2ee8
xor ecx, ecx
jmp 0x4f2eee
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [edi + 0x109], eax
push edx
mov eax, edi
mov dword [edi + 0x10d], ecx
call fcn.004f3900
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 1], al
mov byte [edi + 0x51], al
mov eax, dword [ebp + 0x10]
lea edx, [edi + 0x46]
lea ebx, [edi + 0x36]
push edx
mov esi, ebx
mov dword [edi + 0x53], eax
mov dword [edi + 0x57], ecx
call fcn.004f3d20
movzx eax, byte [ebp - 1]
sub eax, 0
je 0x4f2f92
sub eax, 1
je 0x4f2f67
sub eax, 2
jne 0x4f2fdf
mov eax, dword [edi + 0x9c]
mov cl, byte [edi + 0x52]
mov byte [eax + 7], cl
mov dl, byte [edi + 0x52]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x9c]
add dl, 1
push ecx
mov esi, edi
mov byte [eax + 0x4011d], dl
call fcn.004f34c0
jmp 0x4f2fdf
mov edx, dword [edi + 0x9c]
mov al, byte [edi + 0x52]
mov byte [edx + 7], al
mov cl, byte [edi + 0x52]
mov eax, dword [ebp + 0xc]
mov edx, dword [edi + 0x9c]
add cl, 1
push eax
mov esi, edi
mov byte [edx + 0x4011d], cl
call fcn.004f3390
jmp 0x4f2fdf
xor al, al
cmp byte [edi + 0x50], al
jbe 0x4f2fc3
lea esp, [esp]
mov edx, dword [edi + 0x9c]
movzx ecx, al
imul ecx, ecx, 0x40116
mov dword [ebp + 0x14], ebx
mov bl, byte [edi + 0x52]
mov byte [ecx + edx + 7], bl
mov ebx, dword [ebp + 0x14]
add al, 1
cmp al, byte [edi + 0x50]
jb 0x4f2fa0
cmp byte [edi], 2
jbe 0x4f2fd4
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.004f30d0
jmp 0x4f2fdf
mov ecx, dword [ebp + 0xc]
push ecx
mov esi, edi
call fcn.004f3280
mov ecx, 0x20
cmp dword [ebx + 0xc], ecx
je 0x4f300d
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 8]
shr eax, 3
add eax, dword [ebx]
bswap edx
mov dword [ebx + 8], edx
mov dword [eax], edx
mov eax, ecx
sub eax, dword [ebx + 0xc]
mov dword [ebx + 0xc], ecx
add dword [ebx + 4], eax
mov dword [ebx + 8], 0
mov ecx, dword [ebx + 4]
mov edx, dword [ebx]
add ecx, 7
shr ecx, 3
call fcn.00451ee0
mov esi, dword [ebp + 8]
mov word [edi + 0xa5], ax
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
push 0
lea ecx, [ebp + 0xc]
push ecx
mov ecx, dword [esi]
add edx, 7
shr edx, 3
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebx]
push edx
mov dword [ebx + 4], 0
call fcn.00447aed
mov ax, word [edi + 0xa5]
mov ch, al
push 0
mov cl, ah
lea eax, [ebp + 8]
push eax
push 2
movzx edx, cx
mov word [edi + 0xa5], cx
lea ecx, [ebp + 0xc]
mov dword [ebp + 0xc], edx
mov edx, dword [esi]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
lea edx, [ebp + 0x10]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4f30af
mov dword [ebp + 0x14], eax
sub eax, dword [edi + 0x109]
mov dword [edi + 0x111], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x10]
sub eax, dword [edi + 0x109]
mov ecx, dword [ebp + 0x14]
pop esi
mov dword [ebp + 0x14], ecx
mov dword [edi + 0x111], eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10