Function at 0x40a440
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2240
call fcn.00455b10
mov eax, dword [0x634274]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00486960
push str.C:log_
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0048a3a1
push 0x800
lea eax, [ebp - 0x1230]
push 0
push eax
call fcn.00486960
push str.SmartCloudWB
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push str._s_s.log
push eax
call fcn.00406110
add esp, 0x34
call fcn.00460579
test al, al
je 0x40a4d8
les eax, [edi]
add byte [eax - 0x38], ch
pop eax
pop esp
add byte [ebp - 0x4137b], cl
jmp [eax + 4]
retf 0x7c4
call dword [eax - 0x73]
test esp, esp
stc
invalid
in al, 0x58
pop esp
add byte [eax - 0x18], dl
pop ebp
mov esp, 0xc483ffff
xor al, 0xe8
mov esi, 0x84000560
sal byte [ecx + ebx + 0x74], 0xa9
je 0x40a46a
ja 0x40a492
mov ebx, 0x8006a872
adc eax, 0x131334e
jle 0x40a4a0
push esp
daa
push ss
mov esi, 0xed935719
jno 0x40a4c1
call fcn.0046082b
test al, al
je 0x40a4fb
dec esi
arpl word [0x74c08400], ax
sbb al, byte [edx + ecx*2 - 0xac52fcf]
test byte [edx + 0x31], cl
sar byte [edx], 1
cmc
mov dword [0x65158434], eax
adc al, 0xa9
out 0x9f, al
sbb dh, dh
jbe 0x40a569
js 0x40a4a9
and byte [ebp + 0x38], bh
and eax, 0x2086893
add byte [eax], al
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.00486960
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00486960
add esp, 0x18
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a541
sub ecx, edx
sar ecx, 1
je 0x40a7b1
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.00485ef4
xor ecx, ecx
push str.SmartCloudWB
mov word [eax], cx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0xa2c]
push 0x5c58d8
push eax
call fcn.00406110
add esp, 0x18
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a7b1
pop esp
add byte [esi - 0x77], ah
or byte [ebp - 0x4137b], cl
call dword [eax - 0x73]
test esp, edx
cmc
invalid
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a5a7
sub ecx, edx
lea eax, [ebp - 0x20a]
sar ecx, 1
lea eax, [eax + ecx*2]
push eax
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.0048a3a1
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x61c]
push 0x5c58f8
push eax
call fcn.00406110
add esp, 0x1c
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x1230]
push 0x3ff
push 0x400
push eax
call fcn.00405060
push dword [eax + 4]
push dword [eax]
call fcn.0048e27c
push 0
call fcn.0048e9e9
mov dword [ebp - 0x2240], eax
lea eax, [ebp - 0x2240]
push eax
mov dword [ebp - 0x223c], edx
call fcn.0048e943
add esp, 0x28
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
test esi, esi
je 0x40a7b1
lea ecx, [ebp - 0x1230]
push ecx
push eax
push dword [esi]
mov eax, dword [esi + 0x10]
push dword [esi + 4]
inc eax
push dword [esi + 8]
push dword [esi + 0xc]
push eax
mov eax, dword [esi + 0x14]
add eax, 0x76c
push eax
lea eax, [ebp - 0x2230]
push str.__d__d__d__d__d__d___d_:_s
push eax
call fcn.00406140
add esp, 0x28
call fcn.00460534
test al, al
je 0x40a6a2
js 0x40a6da
out dx, eax
push edi
add byte [edi - 0x307e7a1c], dl
invalid
call fcn.00460420
test al, al
je 0x40a6c0
sti
stc
mov bl, 0x3a
pop ecx
scasb al, byte es:[edi]
mov eax, 0x931ff014
mov byte [0xfe540175], al
fdivr qword [eax + 0x3c]
invalid
call fcn.004607a1
test al, al
je 0x40a6e0
cdq
salc
and eax, 0xbb9e936d
ljmp 0x2eea
push 0x7a9a7ba7
inc eax
xor eax, eax
xor edi, edi
mov word [ebp - 0xa32], ax
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov ecx, 1
lea eax, [ebp - 0x61c]
push 0x5c590c
push eax
cmovne edi, ecx
call fcn.0048a77f
mov esi, eax
add esp, 8
test esi, esi
je 0x40a7b1
test edi, edi
jne 0x40a742
push esi
push 2
lea eax, [ebp - 0x2238]
mov dword [ebp - 0x2238], 0xfeff
push 1
push eax
call fcn.0048e661
add esp, 0x10
lea ecx, [ebp - 0x2230]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a750
sub ecx, edx
sar ecx, 1
push esi
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x2230]
push 1
push eax
call fcn.0048e661
push esi
push 2
lea eax, [ebp - 0x2234]
mov dword [ebp - 0x2234], 0xd
push 1
push eax
call fcn.0048e661
push esi
push 2
lea eax, [ebp - 0x2234]
mov dword [ebp - 0x2234], 0xa
push 1
push eax
call fcn.0048e661
push esi
call fcn.0048e3a9
add esp, 0x34
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00455afe
mov esp, ebp
pop ebp
ret