Function at 0x4040d0
Capabilities:
Copy file
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x48f403
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b8968]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
push 0x4978d6
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24], 1
call fcn.00402f40
xor esi, esi
push 0x4978d6
lea ecx, [esp + 0x18]
mov dword [esp + 0x4c], esi
call fcn.00402f40
push str.ALUpdate.exe
lea ecx, [esp + 0x38]
mov byte [esp + 0x4c], 1
call fcn.00402f40
push str.AZMain.dll
lea ecx, [esp + 0x3c]
mov byte [esp + 0x4c], 2
call fcn.00402f40
push 0x4978d6
lea ecx, [esp + 0x40]
mov byte [esp + 0x4c], 3
call fcn.00402f40
mov eax, dword [esp + 0x34]
mov eax, dword [eax - 0xc]
cmp eax, esi
mov byte [esp + 0x48], 4
mov dword [esp + 0x1c], esi
je 0x4043fc
lea ebx, [esp + 0x34]
mov esi, dword [ebx]
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
mov dword [esp + 0x30], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4041a6
cmp eax, dword [esi]
jne 0x4041a6
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4041dc
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4043ef
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
add eax, 1
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00472f68
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
push ecx
mov edx, esp
mov dword [esp + 0x38], esp
push edx
mov byte [esp + 0x54], 5
call fcn.0042ffe0
lea eax, [esp + 0x30]
add esp, 4
push eax
mov byte [esp + 0x54], 4
call fcn.0042e2e0
add esp, 0xc
mov ecx, dword [eax]
mov esi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x48], 6
je 0x404265
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x404257
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x404257
push eax
call fcn.004019a0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40424e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x18], ebp
jmp 0x404265
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x20]
call fcn.004020c0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x48], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40428a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebx]
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
mov dword [esp + 0x34], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4042ba
cmp eax, dword [esi]
jne 0x4042ba
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4042f0
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x4043ef
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
add eax, 1
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.00472f68
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
push ecx
mov edx, esp
mov dword [esp + 0x34], esp
push edx
mov byte [esp + 0x54], 7
call fcn.004300e0
lea eax, [esp + 0x34]
add esp, 4
push eax
mov byte [esp + 0x54], 4
call fcn.0042e2e0
add esp, 0xc
mov ecx, dword [eax]
mov esi, dword [esp + 0x14]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x48], 8
je 0x404379
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40436b
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40436b
push eax
call fcn.004019a0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x404362
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x404379
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.004020c0
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x48], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40439e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
call fcn.0042d2b0
add esp, 4
test eax, eax
je 0x4043ba
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4043f4
mov eax, dword [esp + 0x1c]
add eax, 1
mov edx, dword [esp + eax*4 + 0x34]
cmp dword [edx - 0xc], 0
lea ebx, [esp + eax*4 + 0x34]
mov dword [esp + 0x1c], eax
jne 0x404176
jmp 0x4043fc
jmp fcn.004014b0
mov dword [esp + 0x20], 0
push fcn.00401a80
push 3
push 4
lea eax, [esp + 0x40]
push eax
mov byte [esp + 0x58], 1
call fcn.0047491e
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x48], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404439
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x48], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404461
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret