Function at 0x4656fe
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4b9ea8
call fcn.0049dfc4
sub esp, 0x24
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
mov eax, dword [eax + 0xc]
mov esi, ecx
cmp eax, ebx
push edi
mov dword [ebp - 0x20], esi
jne 0x465723
xor eax, eax
jmp 0x46572a
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebx
je 0x465991
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x4657a1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, ebx
jne 0x46575a
mov dword [ebp - 0x10], ebx
jmp 0x465764
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
call fcn.00402f35
mov eax, dword [ebp + 8]
push dword [ebp - 0x10]
mov eax, dword [eax + 4]
push eax
push dword [ebp - 0x14]
call fcn.0049e1e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp byte [esi + 0x34], bl
je 0x465902
push ebx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x4657ad
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x465991
push 0x4e8c2c
push eax
push edi
call fcn.004774b0
cmp eax, ebx
mov dword [ebp - 0x14], eax
push edi
jge 0x4657d6
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call esi
push dword [ebp + 8]
call esi
mov eax, dword [ebp - 0x14]
jmp 0x4659c5
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
mov dword [ebp - 0x10], ebx
add esi, 0x24
mov dword [ebp - 4], ebx
mov ecx, esi
call fcn.00402f35
mov eax, dword [esi + 4]
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
je 0x46581f
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x46581f
push dword [ebp + 8]
call edi
push 0xffffffffffffffff
jmp 0x46598b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push dword [ebp + 8]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x465845
call edi
cmp dword [ebp - 0x10], ebx
je 0x465991
push dword [ebp - 0x10]
jmp 0x46598b
call dword [sym.imp.KERNEL32.dll_GlobalSize]
lea ecx, [ebp - 0x1c]
push ebx
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], eax
je 0x465876
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
jmp 0x465832
cmp dword [ebp - 0x10], ebx
je 0x465887
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
call edi
mov edi, dword [ebp - 0x20]
lea ecx, [ebp - 0x30]
neg esi
lea eax, [edi + 0x30]
sbb esi, esi
and esi, eax
push esi
call fcn.00411368
lea eax, [ebp - 0x30]
push 0x4e8c28
push eax
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.004659d6
mov esi, eax
lea ecx, [ebp - 0x30]
cmp esi, ebx
mov byte [ebp - 4], bl
setl byte [ebp + 0xb]
call fcn.004012b4
cmp byte [ebp + 0xb], bl
je 0x4658eb
cmp dword [ebp - 0x10], ebx
je 0x4658e4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x4659c5
cmp dword [ebp - 0x10], ebx
je 0x4659c3
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4659c3
mov dword [ebp + 8], ebx
add esi, 0x24
mov dword [ebp - 4], 2
mov ecx, esi
call fcn.00402f35
mov esi, dword [esi + 4]
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
je 0x465947
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x465947
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x465818
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
mov dword [ebp - 0x20], eax
push edi
je 0x46597d
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
lea eax, [ebp - 0x1c]
push ebx
push eax
push esi
push dword [ebp - 0x20]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x1c], esi
je 0x465998
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp + 8], ebx
je 0x465991
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x4659c5
cmp dword [ebp + 8], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4659ab
push dword [ebp + 8]
call esi
mov dword [ebp + 8], ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp + 8], ebx
je 0x4659c3
push dword [ebp + 8]
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4