Function at 0x40bef6
Capabilities:
Write file on windows

Disassembly:
push 0x90
mov eax, 0x416813
call fcn.00415e82
mov dword [ebp - 0x78], ecx
xor edi, edi
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x88], edi
mov dword [ebp - 4], edi
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
push 2
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x40bf33
mov ecx, eax
call fcn.00410852
mov dword [0x41a070], edi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x7c], edi
mov byte [ebp - 4], 2
mov byte [ebp - 4], 3
mov byte [ebp - 4], 4
mov byte [ebp - 4], 5
lea eax, [ebp - 0x90]
push eax
lea ecx, [ebp - 0x80]
call fcn.0040da07
mov byte [ebp - 4], 6
push dword [eax]
call fcn.0040bdbb
test eax, eax
js 0x40bf2c
mov byte [ebp - 4], 7
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x90]
cmp dword [eax], edi
je 0x40bf82
mov dword [eax + 4], ebx
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x68], edi
mov byte [ebp - 4], 8
mov byte [ebp - 4], 9
mov byte [ebp - 4], 0xa
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040da07
mov byte [ebp - 4], 0xc
push dword [eax]
push ebx
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x40bf2c
mov byte [ebp - 4], 0xd
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x94]
cmp dword [eax], edi
je 0x40bfd2
mov dword [eax + 4], ebx
push edi
push edi
push edi
push dword [ebp - 0x80]
push 0x4013a0
push dword [ebp - 0x6c]
call dword [sym.imp.ole32.dll_CoMarshalInterface]
test eax, eax
js 0x40bf2c
cmp dword [ebp - 0x7c], 0
je 0x40c00e
mov ecx, dword [ebp - 0x80]
test ecx, ecx
je 0x40c00b
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x41b25c]
call esi
mov dword [ebp - 0x7c], edi
mov eax, dword [ebp - 0x6c]
mov esi, dword [eax]
push ebx
lea ecx, [ebp - 0x5c]
push ecx
push eax
mov ecx, dword [esi + 0x30]
call dword [0x41b25c]
call dword [esi + 0x30]
test eax, eax
js 0x40bf2c
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x64], ecx
call fcn.0040e6bd
mov ebx, eax
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], edi
test ebx, ebx
je 0x40c04b
mov dword [ebp - 0x70], 1
mov byte [ebp - 4], 0xe
mov byte [ebp - 4], 0xf
mov byte [ebp - 4], 0x10
mov byte [ebp - 4], 0x11
mov eax, dword [ebp - 0x6c]
mov esi, dword [eax]
push edi
push edi
push edi
push edi
push eax
mov ecx, dword [esi + 0x14]
call dword [0x41b25c]
call dword [esi + 0x14]
mov eax, dword [ebp - 0x6c]
mov esi, dword [eax]
lea ecx, [ebp - 0x98]
push ecx
push dword [ebp - 0x64]
push ebx
push eax
mov ecx, dword [esi + 0xc]
call dword [0x41b25c]
call dword [esi + 0xc]
test eax, eax
js 0x40bf2c
mov eax, dword [ebp - 0x98]
cmp eax, dword [ebp - 0x64]
je 0x40c0ab
mov ecx, 0x80004005
jmp 0x40bf2e
cmp dword [ebp - 0x68], 0
je 0x40c0cb
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
je 0x40c0c8
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x41b25c]
call esi
mov dword [ebp - 0x68], edi
push edi
lea eax, [ebp - 0x60]
push eax
push 4
lea eax, [ebp - 0x64]
push eax
mov esi, dword [ebp - 0x78]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40c0e9
call fcn.00410938
cmp dword [ebp - 0x60], 4
jne 0x40c0a1
push edi
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x64]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40c0e4
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0x64]
jne 0x40c0a1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x41a54c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x40c0e4
call fcn.0040be64
test eax, eax
js 0x40bf2c
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], 0x12
mov byte [ebp - 4], 0x13
mov byte [ebp - 4], 0x14
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x70], 0
je 0x40c159
test ebx, ebx
je 0x40c156
mov edx, ebx
call fcn.0040e697
mov dword [ebp - 0x70], edi
mov byte [ebp - 4], 0x15
mov byte [ebp - 4], 0x16
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x6c]
call fcn.0040dd72
mov byte [ebp - 4], 0x17
mov byte [ebp - 4], 0x18
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x80]
call fcn.0040dd72
mov dword [ebp - 4], edi
or dword [ebp - 4], 0xffffffff
jmp 0x40c242
test byte [ebp - 0x8c], 2
je 0x40c250
call fcn.00412e7d
mov eax, edi
call fcn.00415dcf
ret