Function at 0x407c40
Capabilities:
Delete file
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x41cdf0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x423044]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x423044]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x54]
xor eax, eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov word [esp + 0x3d], ax
mov byte [esp + 0x3f], al
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov esi, ecx
xor ebx, ebx
mov ecx, 0x424614
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebx
mov byte [esp + 0x2c], bl
call edx
lea edi, [eax + 0x10]
mov dword [esp + 0x1c], edi
lea eax, [esp + 0x20]
push ebp
lea ecx, [esi + 0x1c]
push eax
mov dword [esp + 0x54], ebx
call fcn.00408720
add esp, 8
mov byte [esp + 0x4c], 1
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea ebx, [edi - 0x10]
cmp eax, ebx
je 0x407d2d
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x407d1c
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x407d1c
call fcn.00409630
mov dword [esp + 0x14], eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x407d0f
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov edi, dword [esp + 0x14]
add edi, 0x10
mov dword [esp + 0x1c], edi
jmp 0x407d2d
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x20]
call fcn.004094d0
mov edi, dword [esp + 0x1c]
mov byte [esp + 0x4c], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407d52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
lea ebx, [esp + 0x1c]
call fcn.00402640
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
push 0x4205b0
lea edx, [esp + 0x34]
push 0x14
push edx
call fcn.0040c7a4
lea eax, [ebp + 0x124]
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040d087
add esp, 0x18
test eax, eax
jne 0x407dd6
mov ecx, dword [0x425498]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push ebp
call eax
push 0xa
lea ecx, [ebp + 0x104]
push 0
push ecx
call fcn.0040cf3a
mov edx, dword [0x425494]
mov ecx, dword [0x425498]
add edx, eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
add esp, 0xc
push edx
mov dword [0x425494], edx
mov edx, dword [0x42549c]
push edx
call eax
jmp 0x407f47
mov dword [esp + 0x14], 0
jmp 0x407de4
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
push ebp
push ecx
push str.Start__d_download__s
call fcn.004023f0
mov ebx, dword [esi + 0x1c]
mov esi, dword [esi + 0x18]
add esp, 0xc
push 0x407f60
mov ecx, ebp
call fcn.00406880
test eax, eax
je 0x407ead
push edi
lea ebx, [esp + 0x1c]
call fcn.00402640
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push 0x4205b0
lea eax, [esp + 0x34]
push 0x14
push eax
call fcn.0040c7a4
lea esi, [ebp + 0x124]
lea ecx, [esp + 0x3c]
push esi
push ecx
call fcn.0040d087
add esp, 0x18
test eax, eax
je 0x407f3c
push esi
lea edx, [esp + 0x30]
push edx
push edi
push str.File__s_crc_failed_with_local_crc__s_and_remote_crc__s
call fcn.004023f0
add esp, 0x10
push 0
push 0
push 4
push 0
push 2
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [0x425498]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
push ioctlsocket
call edx
sub dword [0x425494], ebx
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, 3
mov dword [esp + 0x14], eax
jl 0x407de0
mov ecx, dword [0x425498]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
push reloc.WS2_32.dll_connect
call edx
push connect
push 0x42548c
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push ebp
push str._s_Download_Error_
call fcn.004023f0
mov esi, dword [esp + 0x2c]
add edi, 0xfffffff0
add esp, 8
mov dword [esp + 0x4c], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407f19
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, esi
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.0040af86
add esp, 0x3c
ret 4
cmp dword [esp + 0x14], 3
jge 0x407ec1
push ebp
push str._s_Download_Successful_
mov esi, 1
call fcn.004023f0
jmp 0x407ef2