Function at 0x4071f0
Capabilities:
Check mutex on windows
Create process on windows
Get file size
Print debug messages
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
mov eax, dword [0x42400c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.__FileCopy_Class__
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x828], eax
test eax, eax
jne 0x40732e
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x828], eax
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
push 0x18
add eax, 0x10
lea ecx, [ebp - 0x818]
push 0x421190
mov dword [ebp - 0x818], eax
call fcn.00404970
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov edi, dword [ebp - 0x818]
add eax, 0x10
push edi
push 0x4211c8
push 0x17
mov dword [ebp - 0x820], eax
lea eax, [ebp - 0x828]
push 0x420f50
push eax
mov dword [ebp - 0x824], 0
call fcn.00404ee0
add esp, 0x14
push dword [ebp - 0x828]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
lea eax, [ebp - 0x820]
push str._s_r_n
push eax
call fcn.00404ee0
mov esi, dword [ebp - 0x820]
add esp, 0xc
push 0x50030
push 0x420ffc
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40730c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x407323
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x828]
jmp 0x407c77
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407473
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x818], eax
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
push 0x2d
add eax, 0x10
lea ecx, [ebp - 0x820]
push 0x421250
mov dword [ebp - 0x820], eax
call fcn.00404970
call fcn.004012f0
test eax, eax
je 0x407ca1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
mov edi, dword [ebp - 0x820]
add eax, 0x10
push edi
push 0x4211c8
push 0x1c
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x818]
push 0x420f50
push eax
mov dword [ebp - 0x824], 0
call fcn.00404ee0
add esp, 0x14
push dword [ebp - 0x818]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
lea eax, [ebp - 0x81c]
push str._s_r_n
push eax
call fcn.00404ee0
mov esi, dword [ebp - 0x81c]
add esp, 0xc
push 0x50030
push 0x420ffc
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407428
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40743f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x818]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40745a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x828]
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407c8c
push 0
push 0x420af8
mov ecx, 0x4256f8
call fcn.00404970
push 0
push 0x420af8
mov ecx, 0x4256fc
call fcn.00404970
mov eax, dword [ebp + 8]
push 0x34
push str.h:prog_
push 4
push 0x142c
mov dword [0x4256f4], eax
call fcn.004085d7
mov esi, eax
add esp, 0x10
test esi, esi
je 0x407543
mov dword [esi], vtable.CTextBase.0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0x14]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x24]
push 0xc00
push 0
push eax
mov dword [esi + 0x20], 0
call fcn.00409df0
push 0x800
lea eax, [esi + 0xc2c]
mov dword [esi], vtable.CTextLine.0
push 0
push eax
mov dword [esi + 0xc24], 0
mov dword [esi + 0xc28], 0
call fcn.00409df0
add esp, 0x18
jmp 0x407545
xor esi, esi
push 0x208
push 0
push 0x425748
mov dword [0x425740], esi
call fcn.00409df0
push 0xa28
push 0
push 0x425950
call fcn.00409df0
mov ax, word [0x420af8]
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push 0
push eax
call fcn.00409df0
add esp, 0x24
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
or ebx, 0xffffffff
test eax, eax
je 0x4076a5
xor eax, eax
lea ecx, [ebp - 0x814]
mov word [ebp - 0x814], ax
mov word [ebp - 0x80e], ax
mov word [ebp - 0x60e], ax
mov word [ebp - 0x40e], ax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x81c]
push eax
call fcn.00403fb0
push ecx
push dword [eax]
push ecx
mov ecx, 0x425748
call fcn.00406360
mov edx, dword [ebp - 0x81c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407611
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.004012f0
mov ecx, eax
test ecx, ecx
je 0x407ca1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x818]
push 0x425748
mov dword [ebp - 0x818], eax
call fcn.004046c0
test al, al
jne 0x407670
mov ecx, 0x425748
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407650
sub ecx, edx
sar ecx, 1
push ecx
push 0x425748
lea ecx, [ebp - 0x818]
call fcn.00404970
lea ecx, [ebp - 0x818]
call fcn.00406a60
mov esi, dword [ebp - 0x818]
push ecx
push esi
push ecx
mov ecx, 0x425748
call fcn.00406360
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4076a5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x420af8
push 0
call fcn.004068d0
add esp, 8
lea ecx, [ebp - 0x830]
push eax
call fcn.00404600
mov eax, dword [ebp - 0x830]
mov esi, dword [0x4256f8]
add esi, 0xfffffff0
lea edi, [eax - 0x10]
cmp edi, esi
je 0x407719
cmp dword [esi + 0xc], 0
jl 0x40770b
mov edx, dword [edi]
cmp edx, dword [esi]
jne 0x40770b
mov ecx, edi
call fcn.00404c00
mov edi, eax
lea edx, [esi + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407701
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [edi + 0x10]
mov dword [0x4256f8], eax
jmp 0x407719
push dword [eax - 0xc]
mov ecx, 0x4256f8
push eax
call fcn.00404970
push 9
push 0x4212fc
lea ecx, [ebp - 0x830]
call fcn.00404d60
mov eax, dword [0x425740]
lea ecx, [ebp - 0x820]
push dword [ebp - 0x830]
mov dword [ebp - 0x818], eax
xor esi, esi
call fcn.00404600
mov eax, dword [ebp - 0x820]
cmp dword [eax - 0xc], esi
je 0x4077ba
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4077b8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [ebp - 0x81c], eax
call fcn.00407d40
push 0
mov edi, eax
lea eax, [ebp - 0x824]
push eax
push dword [ebp - 0x81c]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
jne 0x407847
call eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor esi, esi
xor edi, edi
mov edx, dword [ebp - 0x820]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4077d9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x407c2e
mov ecx, dword [ebp - 0x818]
push esi
push edi
call fcn.00405970
push edi
push 0
push dword [0x4256c8]
movzx esi, al
call dword [sym.imp.KERNEL32.dll_HeapSize]
sub dword [0x4256cc], eax
push edi
push 0
push dword [0x4256c8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x407c2e
mov eax, dword [0x4256f8]
mov ecx, dword [eax - 0x10]
lea edi, [eax - 0x10]
mov dword [ebp - 0x81c], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x40785e
cmp ecx, dword [edi]
jne 0x40785e
lock inc dword [eax]
jmp 0x40788d
call eax
mov eax, dword [ebp - 0x81c]
test eax, eax
je 0x4077b8
mov esi, eax
jmp 0x4077bc
mov eax, dword [ecx]
lea esi, [edi + 4]
push 2
push dword [esi]
call dword [eax]
mov edi, eax
test edi, edi
je 0x407cab
mov eax, dword [esi]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi]
inc edx
push edx
push dword [ebp - 0x81c]
call fcn.00404c60
add esp, 8
mov ecx, dword [0x425740]
add edi, 0x10
mov dword [ebp - 0x820], edi
call fcn.00406220
push eax
lea ecx, [ebp - 0x838]
call fcn.00404580
push 0x421358
lea ecx, [ebp - 0x834]
call fcn.00404600
call fcn.004012f0
mov ecx, eax
test ecx, ecx
je 0x407cb0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ecx, [ebp - 0x838]
mov dword [ebp - 0x81c], 0
lea esi, [eax + 0x10]
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x818], esi
push eax
push dword [ebp - 0x834]
lea eax, [ebp - 0x824]
push eax
call fcn.004042f0
lea ecx, [esi - 0x10]
mov dword [ebp - 0x83c], ecx
mov edx, dword [eax]
lea eax, [edx - 0x10]
mov dword [ebp - 0x82c], eax
cmp eax, ecx
je 0x40797a
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x407965
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x407965
mov ecx, dword [ebp - 0x82c]
call fcn.00404c00
mov dword [ebp - 0x82c], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40795a
mov esi, dword [ebp - 0x83c]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x82c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x818], esi
jmp 0x40797a
push dword [edx - 0xc]
lea ecx, [ebp - 0x818]
push edx
call fcn.00404970
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x824]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407997
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x81c]
push eax
push dword [ebp - 0x834]
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x838]
call fcn.004042f0
lea ecx, [esi - 0x10]
mov dword [ebp - 0x83c], ecx
mov edx, dword [eax]
lea eax, [edx - 0x10]
mov dword [ebp - 0x824], eax
cmp eax, ecx
je 0x407a27
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x407a12
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x407a12
mov ecx, dword [ebp - 0x824]
call fcn.00404c00
mov dword [ebp - 0x824], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x407a0d
mov esi, dword [ebp - 0x83c]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x824]
lea esi, [eax + 0x10]
jmp 0x407a27
push dword [edx - 0xc]
lea ecx, [ebp - 0x818]
push edx
call fcn.00404970
mov esi, dword [ebp - 0x818]
mov edx, dword [ebp - 0x82c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407a44
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi - 0xc]
test eax, eax
je 0x407a72
push eax
push esi
lea ecx, [ebp - 0x820]
call fcn.00404d60
mov edi, dword [ebp - 0x820]
push 1
push 0
push 0
push edi
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x5e
push str.h:prog_
push 4
push 0x20
call fcn.004085d7
add esp, 0x10
mov dword [ebp - 0x824], eax
test eax, eax
je 0x407ae4
push eax
push 0x406e20
mov dword [eax + 4], 0
mov byte [eax + 8], 0
mov dword [eax + 0xc], 0
mov byte [eax + 0x10], 0
push 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 5
push 0x6d
mov dword [eax], vtable.CWaitDlg.0
mov dword [eax + 0x1c], 0x4256e8
push dword [0x4256f4]
call dword [sym.imp.USER32.dll_CreateDialogParamW]
mov edx, dword [ebp - 0x824]
mov ecx, dword [edx + 0x1c]
mov dword [ecx + 4], eax
jmp 0x407ae6
xor edx, edx
push 0x5f
push str.h:prog_
push 4
push 0x28
mov dword [0x425744], edx
call fcn.004085d7
add esp, 0x10
mov dword [ebp - 0x81c], eax
test eax, eax
je 0x407b7a
push eax
push 0x406e20
mov dword [eax + 4], 0
mov byte [eax + 8], 0
mov dword [eax + 0xc], 0
mov byte [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 5
push 0
push 0x6c
mov dword [eax], vtable.CFileCopyDlg.0
mov dword [eax + 0x20], 0x4256e8
mov dword [eax + 0x24], 0x4256e8
mov dword [eax + 0x1c], 0
push dword [0x4256f4]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
mov ecx, dword [ebp - 0x81c]
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x407b7c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x81c]
jmp 0x407b7c
xor ecx, ecx
mov dword [0x42573c], ecx
test ecx, ecx
je 0x407b8c
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [0x425744]
test ecx, ecx
je 0x407b9c
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [0x425740]
test ecx, ecx
je 0x407bac
mov eax, dword [ecx]
push 1
call dword [eax]
push dword [ebp - 0x828]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x828]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407bdb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x834]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407bf8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x838]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407c15
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x407c71
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x407c71
mov ecx, dword [ebp - 0x818]
call fcn.00405bb0
mov esi, dword [ebp - 0x828]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x425740]
test ecx, ecx
je 0x407c5d
mov eax, dword [ecx]
push 1
call dword [eax]
push 0
push 0x421310
push str.Update.up
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp - 0x830]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x407c8c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040805b
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00405840
call fcn.00404d50
push 0x80004005
call fcn.00405840
int3