Function at 0x4f7b70
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4340
call fcn.006df660
mov eax, dword [0x7f9c40]
xor eax, esp
mov dword [esp + 0x433c], eax
push ebx
mov ebx, dword [esp + 0x434c]
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x4360]
cmp ecx, 3
je 0x4f7be0
cmp ecx, 2
je 0x4f7be0
cmp ecx, 1
jne 0x4f7bd6
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x4f7bbd
push dword [edi]
call fcn.004fab80
add esp, 4
mov esi, dword [edi]
mov ebp, dword [esp + 0x4354]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [esi + 4]
jl 0x4f7cd4
mov eax, 0x10000
jmp 0x4f7fae
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x4f7bae
mov ebp, dword [esp + 0x4354]
cmp ebp, eax
je 0x4f7c8f
cmp eax, 0xffffffff
je 0x4f7c06
push dword [edi]
call fcn.004fab80
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x4f7bd6
cmp ebp, dword [eax + 0x10]
jge 0x4f7c22
push eax
call fcn.004fac00
add esp, 4
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x4f7c83
nop dword [eax]
test esi, esi
je 0x4f7c7c
cmp dword [esi + 0x18], 0
je 0x4f7c7c
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x4f7c7c
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.004fb590
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x4f7c30
push esi
call fcn.004faee0
add esp, 4
mov dword [edi + 4], ebp
push dword [esp + 0x435c]
push ebx
push dword [edi]
call fcn.004fb200
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4f7cb1
mov eax, 0x600
jmp 0x4f7fae
push dword [edi]
call fcn.004fab80
add esp, 4
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x4f7db8
mov eax, 0x5000000
jmp 0x4f7fae
cmp ebp, dword [esi + 0x10]
jge 0x4f7d0f
test esi, esi
je 0x4f7d0f
mov eax, dword [esi + 0x24]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push eax
lea eax, [esi + 0x28]
mov dword [esi + 0x10], 0
push eax
push esi
call fcn.004fb590
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x4f7d69
test esi, esi
je 0x4f7d62
cmp dword [esi + 0x18], 0
je 0x4f7d62
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x4f7d62
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.004fb590
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x4f7d16
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push ebp
call fcn.004f74a0
test byte [esp + 0x120], 0x10
je 0x4f7dbf
cmp dword [esp + 0x4360], 1
je 0x4f7db8
push 0x103
lea eax, [esp + 0x148]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004f7910
lea eax, [esp + 0x150]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004f7190
add esp, 0x14
xor eax, eax
jmp 0x4f7fae
mov ebp, dword [esp + 0x4360]
cmp ebp, 1
je 0x4f7ee3
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x4f7ec6
mov esi, eax
cmp si, 0x2f
je 0x4f7df2
cmp word [ecx], 0x5c
je 0x4f7df2
add ecx, 2
jmp 0x4f7df7
lea edx, [ecx + 2]
mov ecx, edx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x4f7de1
cmp edx, ebx
je 0x4f7ec6
lea esi, [esp + 0x144]
mov ecx, ebx
sub esi, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi + ecx - 2], ax
test ax, ax
jne 0x4f7e14
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x4f7fc9
xor eax, eax
mov word [esp + edx + 0x144], ax
mov ax, word [esp + 0x144]
cmp ax, 0x2f
je 0x4f7e69
cmp ax, 0x5c
je 0x4f7e69
cmp word [esp + 0x146], 0x3a
mov byte [esp + 0x13], 0
jne 0x4f7e6e
mov byte [esp + 0x13], 1
lea eax, [esp + 0x144]
push 0x72b800
push eax
call fcn.006e1892
mov esi, eax
lea eax, [esp + 0x14c]
push 0x72b808
push eax
call fcn.006e1892
movzx ecx, byte [esp + 0x23]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x4f7ec6
lea eax, [esp + 0x144]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004f7190
add esp, 8
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4f7ef2
mov eax, 0x200
jmp 0x4f7fae
push dword [edi]
call fcn.004faee0
push 0x4000
lea eax, [esp + 0x354]
mov byte [esp + 0x1b], 0
push eax
push dword [edi]
call fcn.004fb200
add esp, 0x10
test eax, eax
js 0x4f7f53
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4f7f58
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea eax, [esp + 0x358]
push eax
push ebx
call esi
test eax, eax
je 0x4f7f53
push 0x4000
lea eax, [esp + 0x350]
push eax
push dword [edi]
call fcn.004fb200
add esp, 0xc
test eax, eax
jns 0x4f7f1f
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4f7f8a
cmp byte [esp + 0x13], 0
jne 0x4f7f8a
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp ebp, 1
je 0x4f7f96
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.004fab80
xor eax, eax
add esp, 4
cmp byte [esp + 0x13], al
mov ecx, 0x400
cmovne eax, ecx
mov ecx, dword [esp + 0x434c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.006def69
add esp, 0x4340
ret 0x10
call fcn.006df575
int3