Function at 0x404340
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40e540
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push 0x41a5a4
call edi
mov dword [esp + 0x14], eax
push 0x41a59c
push 0x41a58c
call fcn.00407b75
add esp, 8
cmp eax, ebx
je 0x4044b4
push eax
call edi
mov edi, eax
mov dword [esp + 0x1c], edi
push 0x5c
push edi
call fcn.00407b35
add esp, 8
cmp eax, ebx
je 0x40444f
mov ebp, dword [sym.imp.OLEAUT32.dll_SysStringLen]
sub eax, edi
sar eax, 1
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
mov dword [esp + 0x24], esi
call ebp
push esi
push ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x40440e
xor ecx, ecx
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov edi, ebx
lea eax, [ecx + ecx]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [eax + ebx], 0
mov eax, dword [esp + 0x14]
push eax
call ebp
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40441e
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
jmp 0x404427
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
call esi
mov ecx, dword [esp + 0x14]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40445b
push 0x41a588
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push 0x41a588
lea ecx, [esp + 0x1c]
call fcn.004042a0
jmp 0x40445b
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
mov ebp, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [0x41e04c]
test eax, eax
je 0x4044a7
mov edx, dword [esp + 0x14]
push edx
push str.bsFilePathPC___ls_r_n
push 0x41de54
call fcn.0040762a
mov edi, 0x41de54
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x41e04c]
push 0
not ecx
dec ecx
push 0x41e048
push ecx
push 0x41de54
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x1c]
push edi
call ebp
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
xor ebx, ebx
jmp 0x4044c0
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
mov ebp, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push 0x41a544
call edi
mov edi, eax
mov dword [esp + 0x1c], edi
push 0x2e
push edi
call fcn.00407b35
add esp, 8
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x40467d
mov ebx, eax
sub ebx, edi
sar ebx, 1
push ebx
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebp, eax
test ebp, ebp
je 0x404532
xor ecx, ecx
lea eax, [ebx + ebx]
mov ecx, eax
xor esi, esi
mov esi, dword [esp + 0x1c]
mov edx, ecx
mov edi, ebp
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [eax + ebp], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], ebp
push edi
call esi
mov ebp, eax
sub ebp, ebx
push ebp
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
je 0x40457c
xor ecx, ecx
add ebp, ebp
mov ecx, ebp
xor esi, esi
mov esi, dword [esp + 0x20]
mov eax, ecx
mov edi, ebx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebx + ebp], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [esp + 0x24], ebx
mov ebp, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], 1
mov ecx, dword [0x41e064]
xor eax, eax
mov dword [esp + 0x28], ecx
mov ecx, 9
lea edi, [esp + 0x2c]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x20]
push 0xa
push edx
push eax
call fcn.00407b03
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp eax, ecx
je 0x4045e7
test eax, eax
je 0x4045d0
push eax
call ebp
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov edx, dword [esp + 0x14]
push eax
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x18]
push edi
call esi
push eax
push edi
lea ecx, [esp + 0x18]
call fcn.004042a0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x41a540
call ebx
push eax
push 0x41a540
lea ecx, [esp + 0x18]
call fcn.004042a0
lea eax, [esp + 0x28]
push eax
call ebx
lea ecx, [esp + 0x28]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.004042a0
push 0x41a53c
call ebx
push eax
push 0x41a53c
lea ecx, [esp + 0x18]
call fcn.004042a0
mov ebx, dword [esp + 0x24]
push ebx
call esi
push eax
push ebx
lea ecx, [esp + 0x18]
call fcn.004042a0
mov edx, dword [esp + 0x10]
push 0
push edx
call fcn.00407abf
add esp, 8
cmp eax, 0xffffffff
je 0x404699
mov eax, dword [esp + 0x20]
inc eax
cmp eax, 0x3e8
mov dword [esp + 0x20], eax
jb 0x404592
jmp 0x4046bb
cmp edi, ebx
je 0x404582
push edi
call esi
push eax
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [esp + 0x18], eax
jmp 0x404582
mov eax, dword [esp + 0x10]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x41e04c], eax
cmp dword [0x41e04c], 0xffffffff
jne 0x4046f7
mov ecx, dword [esp + 0x10]
push ecx
call ebp
mov edx, dword [esp + 0x1c]
push edx
call ebp
mov eax, dword [esp + 0x14]
push eax
call ebp
push ebx
call ebp
push edi
call ebp
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
add esp, 0x4c
ret
mov eax, dword [0x41de50]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
je 0x404723
test eax, eax
je 0x40470b
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [esp + 0x10]
push eax
push edx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [0x41de50], eax
mov eax, dword [esp + 0x10]
push eax
call ebp
mov ecx, dword [esp + 0x1c]
push ecx
call ebp
mov edx, dword [esp + 0x14]
push edx
call ebp
push ebx
call ebp
push edi
call ebp
mov ecx, dword [esp + 0x50]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x4c
ret