Function at 0x401380
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x878
mov eax, dword [0x41bee4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push str.update.log
call fcn.00406120
add esp, 4
mov ebx, 0x104
push ebx
push 0x41d568
push esi
mov dword [0x41d140], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
movzx ecx, word [eax + 0x41d568]
mov word [ebp + eax - 0x40c], cx
add eax, 2
test cx, cx
jne 0x4013c0
lea eax, [ebp - 0x40c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4013e0
sub eax, edx
sar eax, 1
lea ecx, [ebp + eax*2 - 0x40c]
js 0x40140b
cmp word [ecx], 0x5c
je 0x401406
sub ecx, 2
dec eax
jns 0x4013f8
jmp 0x40140b
xor eax, eax
mov word [ecx], ax
lea ecx, [ebp - 0x40c]
push ecx
push 0x416374
push ebx
push 0x41d148
call fcn.00406302
push 0x416294
push 0x41d568
call fcn.004062eb
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x401468
push eax
push 0x41628c
push 0x416344
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004063d2
mov esp, ebp
pop ebp
ret 0x10
push edi
call fcn.004018e0
mov edx, 0xfffffffc
push 2
sub edx, eax
push edx
push edi
call fcn.00406ac4
push edi
push 4
lea eax, [ebp - 0xc]
push 1
push eax
call fcn.00406a1d
add esp, 0x20
mov byte [ebp - 8], 0
mov ecx, str.typa
lea eax, [ebp - 0xc]
jmp 0x4014a0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4014c0
test dl, dl
je 0x4014bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4014c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4014a0
xor eax, eax
jmp 0x4014c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4014fc
push edi
call fcn.004061b9
add esp, 4
push 0
push 0x401050
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
push 0x65
push esi
call dword [sym.imp.USER32.dll_DialogBoxParamW]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004063d2
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea ecx, [ebp - 0x614]
push 0
push ecx
call fcn.00406b40
push 0x58
lea edx, [ebp - 0x878]
push 0
push edx
call fcn.00406b40
add esp, 0x18
lea edx, [ebp - 0x878]
lea eax, [ebp - 0x614]
lea ecx, [ebp - 0x81c]
push edx
mov dword [ebp - 0x878], 0x58
mov dword [ebp - 0x86c], 0x416320
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x858], ebx
mov dword [ebp - 0x854], ecx
mov dword [ebp - 0x850], ebx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
je 0x4016be
mov eax, dword [ebp - 0x854]
push eax
push 0x41d148
push str._s_s.exe
lea ecx, [ebp - 0x40c]
push 0x200
push ecx
call fcn.00406302
lea edx, [ebp - 0x40c]
push 0x416304
push edx
call fcn.004062eb
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x40168e
mov eax, dword [ebp - 0x85c]
push 0x416294
push eax
call fcn.004062eb
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x401694
push 0
push 0
push edi
call fcn.00406ac4
push edi
call fcn.004067ab
add esp, 0x10
test eax, eax
jne 0x401611
push edi
push 0x200
lea ecx, [ebp - 0x40c]
push 1
push ecx
call fcn.00406a1d
push esi
push eax
lea edx, [ebp - 0x40c]
push 1
push edx
call fcn.00406731
push edi
call fcn.004067ab
add esp, 0x24
test eax, eax
je 0x4015e0
push ebx
call fcn.004067ab
add esp, 4
test eax, eax
jne 0x401651
mov edi, edi
push ebx
push 0x200
lea eax, [ebp - 0x40c]
push 1
push eax
call fcn.00406a1d
push esi
push eax
lea ecx, [ebp - 0x40c]
push 1
push ecx
call fcn.00406731
push ebx
call fcn.004067ab
add esp, 0x24
test eax, eax
je 0x401620
push ebx
call fcn.00406575
push esi
push 1
lea edx, [ebp - 0x820]
push 4
push edx
mov dword [ebp - 0x820], eax
call fcn.00406731
push esi
push 1
push 4
push str.typa
call fcn.00406731
add esp, 0x24
push 0
push 0x4162fc
push str.6RO
jmp 0x4016a0
mov ebx, dword [ebp - 0x820]
push 0
push 0x41628c
push 0x4162e0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call fcn.004061b9
push ebx
call fcn.004061b9
add esp, 8
jmp 0x4016d7
push 0
push 0x41628c
push 0x4162d0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call fcn.004061b9
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004063d2
mov esp, ebp
pop ebp
ret 0x10