Function at 0x40e890
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ffec7
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x567e00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x70]
push 0xe
push eax
call fcn.00417040
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0
push eax
call fcn.00416f90
add esp, 0xc
mov eax, dword fs:[0x2c]
mov ecx, dword [0x56d69c]
mov byte [ebp - 4], 1
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x56c4d8]
cmp eax, dword [ecx + 4]
jg 0x40ec2b
mov edi, 0x56740c
mov ecx, dword [ebp - 0x48]
mov eax, 0x7ffffffe
mov edx, dword [edi + 0x10]
sub eax, ecx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x84], edx
cmp eax, edx
jb 0x40ec26
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
mov dword [ebp - 0x74], edi
cmovae eax, dword [ebp - 0x58]
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x80], eax
jb 0x40e93c
mov eax, dword [edi]
mov dword [ebp - 0x74], eax
lea eax, [ecx + edx]
mov dword [ebp - 0x40], 0
mov esi, 7
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
lea ebx, [ebp - 0x40]
mov dword [ebp - 0x78], eax
cmp eax, esi
jbe 0x40e999
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x40e977
mov esi, 0x7ffffffe
jmp 0x40e982
cmp esi, 0xa
mov eax, 0xa
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x40]
call fcn.00403890
mov ecx, dword [ebp - 0x7c]
mov ebx, eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x2c], esi
lea esi, [ecx + ecx]
push esi
push dword [ebp - 0x80]
mov dword [ebp - 0x30], eax
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x84]
lea ecx, [ebx + esi]
add eax, eax
push eax
push dword [ebp - 0x74]
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x78]
xor ecx, ecx
add esp, 0x18
mov word [ebx + eax*2], cx
mov ecx, dword [ebp - 0x60]
mov eax, 0x7ffffffe
mov edx, dword [edi + 0x10]
sub eax, ecx
mov byte [ebp - 4], 3
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x7c], edx
cmp eax, edx
jb 0x40ec26
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
mov dword [ebp - 0x78], edi
cmovae eax, dword [ebp - 0x70]
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x80], eax
jb 0x40ea0b
mov eax, dword [edi]
mov dword [ebp - 0x78], eax
lea eax, [ecx + edx]
mov dword [ebp - 0x28], 0
mov esi, 7
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x74], eax
cmp eax, esi
jbe 0x40ea6b
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x40ea46
mov esi, 0x7ffffffe
jmp 0x40ea51
cmp esi, 0xa
mov eax, 0xa
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x28]
call fcn.00403890
mov ecx, dword [ebp - 0x84]
mov ebx, eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x14], esi
lea esi, [ecx + ecx]
push esi
push dword [ebp - 0x80]
mov dword [ebp - 0x18], eax
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x7c]
lea ecx, [ebx + esi]
add eax, eax
push eax
push dword [ebp - 0x78]
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x74]
xor ecx, ecx
add esp, 0x18
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x40]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
cmovae ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 8
push 1
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
call ebx
test eax, eax
jne 0x40eae9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40eae9
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
push 1
cmovae ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
push ecx
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40eb23
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40eb19
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ebfa
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x40eb75
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40eb6b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ebfa
push edx
push ecx
call fcn.004c6f6f
add esp, 8
add edi, 0x18
cmp edi, 0x56743c
jl 0x40e902
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x40ebba
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ebb0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ebfa
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov edx, dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
cmp edx, 8
jb 0x40ec0a
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ec00
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40ec00
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004c6f6f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret
call fcn.00403870
push 0x56c4d8
call fcn.004c7345
add esp, 4
cmp dword [0x56c4d8], 0xffffffff
jne 0x40e8fd
push 0xb
push str.update.ini
mov ecx, 0x56740c
call fcn.00403a70
push 0xf
xor eax, eax
mov dword [0x567424], 0
push 0x516f30
mov ecx, 0x567424
mov byte [ebp - 4], 2
mov dword [0x567434], 0
mov dword [0x567438], 7
mov word [0x567424], ax
call fcn.00403a70
push 0x511390
mov byte [ebp - 4], 1
call fcn.004c71fd
push 0x56c4d8
call fcn.004c72fb
add esp, 8
jmp 0x40e8fd