Function at 0x405040
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x436c46
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x446414]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x446414]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov esi, ecx
mov ecx, section..data
mov dword [esp + 0x10], esi
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
xor ebx, ebx
push str._s.tmp
lea edi, [esp + 0x1c]
mov dword [esp + 0x88], ebx
call fcn.00404180
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
add esp, 8
mov ecx, section..data
mov dword [esp + 0x18], vtable.CFileHelper.0
call edx
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x80], 1
mov esi, dword [esp + 0x14]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
cmp esi, ebx
jne 0x4050e8
xor eax, eax
jmp 0x4050ff
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4050f0
sub eax, edx
sar eax, 1
push esi
lea ecx, [esp + 0x28]
push ecx
mov ebx, eax
call fcn.00401f90
push 0x43b37c
lea edx, [esp + 0x30]
push 0x20
push edx
call fcn.00421318
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.00420ab9
mov edi, eax
xor ebx, ebx
add esp, 0xc
cmp edi, ebx
je 0x40518f
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push edi
push esi
push str.Open_file_failed
lea edi, [esp + 0x1c]
mov byte [esp + 0x8c], 2
call fcn.00404180
mov eax, dword [esp + 0x1c]
add esp, 0xc
add eax, 0xfffffff0
call fcn.00402050
push 0x442644
lea ecx, [esp + 0x2c]
add eax, 0x10
push ecx
mov dword [esp + 0x30], eax
call fcn.0042254a
push 2
mov byte [esp + 0x84], bl
mov edx, dword [esp + 0x20]
push ebx
push edx
call fcn.00420c6b
mov eax, dword [esp + 0x28]
add esp, 0xc
push eax
call fcn.00420e7b
mov ecx, dword [esp + 0x20]
add esp, 4
push ebx
push ebx
push ecx
mov edi, eax
call fcn.00420c6b
add esp, 0xc
lea ecx, [esp + 0x18]
call fcn.004047b0
mov eax, dword [ebp + 8]
cmp eax, ebx
jbe 0x40522d
cmp edi, eax
jb 0x40522d
mov eax, dword [ebp + 0xc]
mov ecx, str.gzip
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405206
cmp dx, bx
je 0x405202
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405206
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4051e0
xor eax, eax
jmp 0x40520b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40521f
mov edx, dword [esp + 0x10]
push edx
push esi
call fcn.00404b20
add esp, 8
jmp 0x405276
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x405276
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test byte [0x449080], 1
jne 0x40526a
or dword [0x449080], 1
mov byte [esp + 0x80], 3
call fcn.0041d990
push 0x437420
mov dword [0x44907c], eax
call fcn.004204a6
add esp, 4
mov byte [esp + 0x80], bl
push 1
push 0x44907c
call fcn.00402f30
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x80], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405299
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0041fcea
mov esp, ebp
pop ebp
ret 8