Function at 0x46c254
Capabilities:
Delete file
Get file size
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
and dword [esp + 0x14], 0
push ebx
push esi
push edi
mov edi, eax
lea eax, [esp + 0x20]
push eax
mov eax, edi
call fcn.0046c086
test eax, eax
jne 0x46c2cc
lea eax, [edi + 0x7c]
cmp dword [eax], 0
jbe 0x46c28e
push 4
push eax
push 2
push dword [esp + 0x2c]
call dword [sym.imp.WININET.dll_InternetSetOptionW]
lea eax, [esp + 0x2c]
push eax
lea esi, [edi + 0x20]
push esi
push edi
call fcn.0046d4d7
mov ebx, dword [sym.imp.WININET.dll_InternetSetStatusCallbackW]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x46c2d3
push eax
lea eax, [edi + 0x6c]
call fcn.00479e60
mov esi, dword [esp + 0x1c]
push 0
push dword [esp + 0x24]
call ebx
push dword [esp + 0x20]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0x18]
push ecx
lea ecx, [esp + 0x14]
push esi
lea eax, [edi + 0x1c]
push ecx
call fcn.0046ecf0
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x46c313
mov eax, 0xe0000005
mov dword [edi + 0x10], eax
push eax
lea eax, [edi + 0x6c]
call fcn.00479e60
mov edi, dword [edi + 0x10]
lea ecx, [esp + 0x10]
call fcn.004058e3
mov esi, edi
jmp 0x46c2b8
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0041f0fb
push 0x4e1e58
lea eax, [esp + 0x18]
push eax
call fcn.00438cdb
lea esi, [edi + 0x6c]
push 1
mov eax, esi
mov dword [esp + 0x1c], esi
call fcn.00479e3d
and dword [esp + 0x24], 0
cmp byte [edi + 0x3c], 0
je 0x46c359
lea eax, [esp + 0x14]
call fcn.0045ffc2
mov dword [esp + 0x24], eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
call fcn.0046c777
mov dword [esp + 0x1c], eax
mov eax, esi
call fcn.00479e74
test al, al
je 0x46c397
lea ecx, [esp + 0x14]
call fcn.004058e3
lea ecx, [esp + 0x10]
call fcn.004058e3
mov esi, 0xe0000008
jmp 0x46c2b8
cmp dword [esp + 0x1c], 0
je 0x46c3ca
cmp dword [esp + 0x1c], 0xe0000013
je 0x46c3b3
push dword [esp + 0x1c]
mov eax, esi
call fcn.00479e60
lea ecx, [esp + 0x14]
call fcn.004058e3
lea ecx, [esp + 0x10]
call fcn.004058e3
jmp 0x46c2b4
mov eax, dword [edi + 8]
mov ecx, dword [esi]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edi
test ecx, ecx
je 0x46c3ef
push dword [esp + 0x10]
mov eax, dword [ecx]
push dword [esp + 0x2c]
call dword [eax + 4]
mov eax, esi
call fcn.00479e74
test al, al
je 0x46c42d
lea edi, [esp + 0x48]
call fcn.0046d8e6
xor esi, esi
push esi
push dword [esp + 0x3c]
call ebx
push dword [esp + 0x38]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x14]
call fcn.004058e3
lea ecx, [esp + 0x10]
call fcn.004058e3
jmp 0x46c2b8
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x46c44c
cmp eax, dword [esp + 0x24]
jne 0x46c44c
mov esi, dword [esi]
test esi, esi
je 0x46c3fa
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 8]
jmp 0x46c3fa
push 0
push 0
lea ecx, [esp + 0x1c]
call fcn.00450af0
pop ecx
pop ecx
xor ecx, ecx
mov dword [esp + 0x1c], eax
cmp eax, ecx
je 0x46c48d
push eax
mov eax, esi
call fcn.00479e60
lea edi, [esp + 0x48]
call fcn.0046d8e6
push 0
push dword [esp + 0x3c]
call ebx
push dword [esp + 0x38]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x46c3b3
xor eax, eax
cmp eax, dword [esp + 0x24]
push ecx
sbb eax, eax
neg eax
push 0x80
inc eax
inc eax
push eax
push ecx
push ecx
push 0xc0000000
lea esi, [esp + 0x2c]
call fcn.0040d3d2
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x40], eax
cmp eax, 0xffffffff
jne 0x46c51f
mov eax, dword [esp + 0x18]
call fcn.00479e74
test al, al
je 0x46c4f5
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x48]
call fcn.0046d8e6
push 0
push dword [esp + 0x3c]
call ebx
push dword [esp + 0x38]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x46c37b
push edi
call fcn.0046d8d3
mov esi, eax
mov eax, dword [esp + 0x18]
push esi
call fcn.00479e60
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x48]
call fcn.0046d8e6
push 0
jmp 0x46c406
xor esi, esi
cmp dword [esp + 0x24], esi
jbe 0x46c542
push 2
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
cmp ecx, esi
je 0x46c552
push dword [esp + 0x24]
jmp 0x46c54d
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
cmp ecx, esi
je 0x46c552
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
push 0xc800
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], esi
call fcn.00438364
lea eax, [esp + 0x24]
push eax
push dword [edi + 4]
mov eax, edi
call fcn.0046c915
and dword [esp + 0x30], 0
mov esi, eax
test esi, esi
jne 0x46c5b6
cmp dword [esp + 0x24], eax
jbe 0x46c63e
mov eax, 0xc800
cmp dword [esp + 0x24], eax
jae 0x46c598
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x30]
push ecx
push eax
push dword [esp + 0x24]
mov eax, edi
push dword [edi + 4]
call fcn.0046c876
mov esi, eax
test esi, esi
je 0x46c637
cmp esi, 0x2ee2
je 0x46c5d6
cmp esi, 0x2efe
je 0x46c5d6
cmp esi, 0x2eff
je 0x46c5d6
cmp esi, 0x2f83
jne 0x46c607
cmp dword [esp + 0x2c], 3
je 0x46c5e4
cmp dword [esp + 0x2c], 4
jne 0x46c607
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x48]
mov eax, edi
push dword [esp + 0x2c]
call fcn.0046c7fe
mov esi, eax
test esi, esi
je 0x46c565
cmp esi, 0xe0000008
je 0x46c619
mov eax, dword [esp + 0x18]
push esi
call fcn.00479e60
push dword [esp + 0x1c]
call fcn.0049d65c
cmp dword [esp + 0x44], 0
pop ecx
je 0x46c50f
push dword [esp + 0x40]
jmp 0x46c509
cmp dword [esp + 0x30], 0
jne 0x46c67c
cmp dword [esp + 0x28], 0
jbe 0x46c6f2
push 0
push dword [esp + 0x44]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [esp + 0x28]
jae 0x46c6f2
cmp dword [esp + 0x2c], 3
je 0x46c5e4
cmp dword [esp + 0x2c], 4
je 0x46c5e4
mov esi, 0xe000000f
jmp 0x46c60f
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x38]
push dword [esp + 0x28]
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46c75c
mov esi, dword [esp + 0x18]
mov ecx, dword [esi]
test ecx, ecx
je 0x46c6b0
push dword [esp + 0x34]
mov eax, dword [ecx]
call dword [eax + 0x10]
lea eax, [edi + 0x34]
push eax
call fcn.00479e8b
mov eax, esi
call fcn.00479e74
test al, al
je 0x46c565
push dword [esp + 0x1c]
call fcn.0049d65c
xor esi, esi
pop ecx
cmp dword [esp + 0x40], esi
je 0x46c6e4
push dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esp + 0x48]
call fcn.0046d8e6
jmp 0x46c405
cmp dword [esp + 0x40], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x46c70a
push dword [esp + 0x40]
call esi
and dword [esp + 0x40], 0
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [esp + 0x10]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
test ecx, ecx
je 0x46c733
mov eax, dword [ecx]
push 1
call dword [eax + 8]
push dword [edi + 0x58]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [esp + 0x1c]
call fcn.0049d65c
cmp dword [esp + 0x44], 0
pop ecx
je 0x46c3fa
push dword [esp + 0x40]
call esi
jmp 0x46c3fa
push edi
call fcn.0046d8d3
mov dword [edi + 0x10], eax
push eax
mov eax, dword [esp + 0x1c]
call fcn.00479e60
mov esi, dword [edi + 0x10]
jmp 0x46c619