Function at 0x677d87
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4654
call fcn.0049bfd0
mov eax, dword [0x79b544]
xor eax, esp
mov dword [esp + 0x464c], eax
push ebx
mov ebx, dword [esp + 0x4660]
push ebp
push esi
push edi
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
je 0x677db9
mov ecx, dword [edi]
call fcn.00678671
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
mov esi, dword [esp + 0x4668]
cmp esi, dword [eax + 4]
jl 0x677dd5
mov eax, 0x10000
jmp 0x67800a
cmp dword [eax + 0x10], esi
jle 0x677def
mov ecx, eax
call fcn.00678c0b
jmp 0x677dea
mov ecx, dword [edi]
call fcn.00678bb4
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x677de3
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push esi
call fcn.006780f6
test byte [esp + 0x224], 0x10
jne 0x678008
lea ebp, [edi + 0x240]
mov esi, 0x104
push ebp
lea eax, [esp + 0x24c]
push esi
push eax
call fcn.005145bf
add esp, 0xc
lea eax, [esp + 0x248]
push ebx
push esi
push eax
call fcn.00517586
mov ax, word [esp + 0x254]
lea esi, [esp + 0x254]
add esp, 0xc
xor ebx, ebx
mov ecx, esi
test ax, ax
je 0x677f48
push 0x2f
pop ebp
push 0x5c
movzx edx, ax
pop ebx
cmp dx, bp
je 0x677e6a
cmp dx, bx
jne 0x677e6d
lea esi, [ecx + 2]
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x677e60
lea eax, [esp + 0x248]
push 0
pop ebx
cmp esi, eax
je 0x677f48
push eax
lea eax, [esp + 0x454]
push 0x104
push eax
call fcn.005145bf
lea eax, [esp + 0x254]
add esp, 0xc
sub esi, eax
sar esi, 1
lea esi, [esi*2 - 2]
cmp esi, 0x208
jae 0x678025
xor eax, eax
mov word [esp + esi + 0x450], ax
mov ax, word [esp + 0x450]
test ax, ax
je 0x677ef6
push 0x2f
pop ecx
cmp ax, cx
je 0x677ef6
push 0x5c
pop ecx
cmp ax, cx
je 0x677ef6
cmp word [esp + 0x452], 0x3a
mov byte [esp + 0x13], bl
jne 0x677efb
mov byte [esp + 0x13], 1
lea eax, [esp + 0x450]
push 0x7653cc
push eax
call fcn.00504947
mov esi, eax
lea eax, [esp + 0x458]
push 0x7653c4
push eax
call fcn.00504947
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne al
or cl, al
or cl, byte [esp + 0x13]
jne 0x677f48
lea edx, [esp + 0x450]
lea ecx, [edi + 0x240]
call fcn.0067802b
push ebx
push dword [esp + 0x228]
lea eax, [esp + 0x250]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x677f78
mov eax, 0x200
jmp 0x67800a
mov edx, dword [edi + 0x23c]
mov ecx, dword [edi]
call fcn.006788c9
mov ecx, dword [edi]
lea edx, [esp + 0x658]
push 0x4000
call fcn.006786ca
pop ecx
cmp eax, 0xffffff96
je 0x677fed
test eax, eax
js 0x677fe6
je 0x677fc5
push ebx
lea ecx, [esp + 0x18]
push ecx
push eax
lea eax, [esp + 0x664]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x677f85
mov ebx, 0x400
jmp 0x677ff2
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x677ff2
mov ebx, 0x5000000
jmp 0x677ff2
mov ebx, 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00678671
test ebx, ebx
je 0x678008
mov eax, ebx
jmp 0x67800a
xor eax, eax
mov ecx, dword [esp + 0x465c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049b511
add esp, 0x4654
ret 0x10
call fcn.0049bba2
int3