Function at 0x404750
Capabilities:
Check if file exists
Delete file
Move file
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a414
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x5a9840]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0xec], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xf8], eax
lea eax, [edi + 0x18]
push 0x564b08
push eax
mov dword [ebp - 0xd8], eax
lea eax, [ebp - 0xa8]
push eax
mov dword [ebp - 0xd4], edi
call fcn.004013d0
mov al, 1
mov dword [ebp - 4], 0
mov byte [ebp - 0xc1], al
mov byte [ebp - 0xc9], al
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0
push 8
mov byte [ebp - 4], al
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
call fcn.004ef1c0
lea ecx, [ebp - 0x84]
mov dword [eax + 4], 0
mov dword [ebp - 0x84], eax
mov dword [eax], ecx
xorps xmm0, xmm0
mov dword [ebp - 0x4c], 0
lea eax, [ebp - 0x40]
movq qword [ebp - 0x54], xmm0
push eax
movups xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x48], 0xffffffff
mov dword [ebp - 0x70], 2
mov dword [ebp - 0x44], 0
call fcn.004c7b9f
add esp, 0x14
mov esi, dword [ebp + 0x18]
mov byte [ebp - 4], 3
mov byte [ebp - 0x18], 0
test esi, esi
je 0x4048ec
lea eax, [ebp - 0x90]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0x8c]
lea ecx, [ebp - 0xd0]
push ecx
push eax
cmp eax, dword [ebp - 0x88]
je 0x4048d3
lea eax, [ebp - 0x90]
push eax
call fcn.00401e60
mov eax, dword [ebp - 0x8c]
add esp, 0xc
add eax, 8
mov dword [ebp - 0x8c], eax
jmp 0x4048e4
lea ecx, [ebp - 0x90]
call fcn.00401850
mov eax, dword [ebp - 0x8c]
sub esi, 1
jne 0x4048a3
mov esi, dword [ebp + 0x18]
xorps xmm0, xmm0
mov dword [ebp - 0xb0], 0
movups xmmword [ebp - 0xc0], xmm0
mov dword [ebp - 0xac], 0xf
mov byte [ebp - 0xc0], 0
push dword [ebp - 0xd8]
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.00404470
test al, al
jne 0x404b19
mov byte [ebp - 0xc1], al
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 6
push eax
call fcn.004c7910
add esp, 4
test eax, eax
jne 0x4051af
cmp dword [ebp - 0x44], 0x7fffffff
je 0x4051c0
lea eax, [ebp - 0x70]
mov byte [ebp - 0x18], 1
push eax
call fcn.004c795c
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b4d
mov eax, dword [ebp - 0x8c]
add esp, 8
mov esi, dword [ebp - 0x90]
mov dword [ebp - 0xc8], eax
cmp esi, eax
je 0x4049c3
cmp dword [esi + 4], 0
je 0x4051da
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [esi + 4], eax
je 0x4051af
push 0
push dword [esi + 4]
push dword [esi]
call fcn.004c7714
add esp, 0xc
test eax, eax
jne 0x4051d3
mov dword [esi], eax
mov dword [esi + 4], eax
add esi, 8
cmp esi, dword [ebp - 0xc8]
jne 0x404984
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b72
mov esi, dword [ebp - 0x74]
add esp, 4
mov edx, dword [ebp - 0x80]
test esi, esi
je 0x404a2c
nop dword [eax]
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x7c]
dec ecx
add ecx, esi
dec eax
and ecx, eax
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0xc8], eax
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x404a1d
mov edx, dword [ecx]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0xc8]
mov dword [eax + 0x24], 0
mov esi, dword [ebp - 0x74]
mov edx, dword [ebp - 0x80]
sub esi, 1
mov dword [ebp - 0x74], esi
jne 0x4049e0
mov dword [ebp - 0x78], 0
test edx, edx
je 0x404a92
mov esi, dword [ebp - 0x7c]
test esi, esi
jle 0x404a52
mov eax, dword [edx + esi*4 - 4]
dec esi
test eax, eax
je 0x404a4e
push 0x28
push eax
call fcn.004ef1f0
mov edx, dword [ebp - 0x80]
add esp, 8
test esi, esi
jg 0x404a37
mov eax, dword [ebp - 0x7c]
lea ecx, [eax*4]
mov eax, edx
cmp ecx, 0x1000
jb 0x404a7a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051b6
push ecx
push edx
call fcn.004ef1f0
add esp, 8
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov eax, dword [ebp - 0x84]
push 8
push eax
mov dword [ebp - 0x84], 0
call fcn.004ef1f0
mov edx, dword [ebp - 0x90]
add esp, 8
test edx, edx
je 0x405096
mov ecx, dword [ebp - 0x8c]
mov eax, edx
cmp eax, ecx
je 0x404ae1
nop word [eax + eax]
cmp dword [eax + 4], 0
jne 0x4051bb
add eax, 8
cmp eax, ecx
jne 0x404ad0
mov ecx, dword [ebp - 0x88]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffff8
cmp ecx, 0x1000
jb 0x404b0a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051b6
push ecx
push edx
call fcn.004ef1f0
add esp, 8
jmp 0x405096
mov ecx, dword [ebp - 0xd8]
mov eax, ecx
cmp dword [ecx + 0x14], 0xf
jbe 0x404b29
mov eax, dword [ecx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404d23
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404d23
xor al, al
mov byte [ebp - 0xc1], al
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 7
push eax
call fcn.004c7910
add esp, 4
test eax, eax
jne 0x4051af
cmp dword [ebp - 0x44], 0x7fffffff
je 0x4051c0
lea eax, [ebp - 0x70]
mov byte [ebp - 0x18], 1
push eax
call fcn.004c795c
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b4d
mov eax, dword [ebp - 0x8c]
add esp, 8
mov esi, dword [ebp - 0x90]
mov dword [ebp - 0xc8], eax
cmp esi, eax
je 0x404be2
cmp dword [esi + 4], 0
je 0x4051da
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [esi + 4], eax
je 0x4051af
push 0
push dword [esi + 4]
push dword [esi]
call fcn.004c7714
add esp, 0xc
test eax, eax
jne 0x4051d3
mov dword [esi], eax
mov dword [esi + 4], eax
add esi, 8
cmp esi, dword [ebp - 0xc8]
jne 0x404ba3
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b72
mov esi, dword [ebp - 0x74]
add esp, 4
mov edx, dword [ebp - 0x80]
test esi, esi
je 0x404c44
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x7c]
dec ecx
add ecx, esi
dec eax
and ecx, eax
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0xc8], eax
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x404c35
mov edx, dword [ecx]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0xc8]
mov dword [eax + 0x24], 0
mov esi, dword [ebp - 0x74]
mov edx, dword [ebp - 0x80]
sub esi, 1
mov dword [ebp - 0x74], esi
jne 0x404bf8
mov dword [ebp - 0x78], 0
test edx, edx
je 0x404cab
mov esi, dword [ebp - 0x7c]
test esi, esi
jle 0x404c6b
nop
mov eax, dword [edx + esi*4 - 4]
dec esi
test eax, eax
je 0x404c67
push 0x28
push eax
call fcn.004ef1f0
mov edx, dword [ebp - 0x80]
add esp, 8
test esi, esi
jg 0x404c50
mov eax, dword [ebp - 0x7c]
lea ecx, [eax*4]
mov eax, edx
cmp ecx, 0x1000
jb 0x404c93
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051b6
push ecx
push edx
call fcn.004ef1f0
add esp, 8
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 0
mov eax, dword [ebp - 0x84]
push 8
push eax
mov dword [ebp - 0x84], 0
call fcn.004ef1f0
mov edx, dword [ebp - 0x90]
add esp, 8
test edx, edx
je 0x405096
mov ecx, dword [ebp - 0x8c]
mov eax, edx
cmp eax, ecx
je 0x404cf1
cmp dword [eax + 4], 0
jne 0x4051bb
add eax, 8
cmp eax, ecx
jne 0x404ce0
mov ecx, dword [ebp - 0x88]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffff8
cmp ecx, 0x1000
jb 0x404b0a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051b6
jmp 0x404b0a
lea eax, [ebp - 0xa8]
mov ecx, edi
push eax
call fcn.004064c0
xor eax, eax
mov dword [ebp - 0xd0], eax
cmp eax, esi
jge 0x404fe1
cmp dword [ebp - 0x94], 0xf
lea eax, [ebp - 0xa8]
push 0
cmova eax, dword [ebp - 0xa8]
push 0x20
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xe4], eax
cmp eax, 0xffffffff
jne 0x404d80
push str._XIMAO___DownloadByParts_m_bCancel__true_r_n
jmp 0x404fd7
push 0x58b972
push 0x38
call fcn.004ef1fe
mov esi, eax
add esp, 8
mov dword [ebp - 0xdc], esi
test esi, esi
je 0x404fd2
cmp dword [ebp + 0x18], 1
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 0xe4]
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x30], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov byte [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov dword [ebp - 0xdc], esi
mov dword [esi + 4], edi
jne 0x404e6a
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub ecx, 1
mov dword [esi + 0x10], 0
mov eax, edx
mov dword [esi + 0x14], 0
sbb eax, 0
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edx
cmp eax, 0xffffffff
jne 0x404e51
test edx, edx
jne 0x404e51
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], edx
xorps xmm0, xmm0
movlpd qword [ebp - 0xf4], xmm0
mov eax, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xf4]
jmp 0x404ee5
push dword [ebp + 0x14]
cdq
push dword [ebp + 0x10]
push edx
push eax
call fcn.004ef400
mov ecx, edx
mov dword [esi + 0x10], eax
mov dword [ebp - 0xf0], eax
mov dword [esi + 0x14], ecx
mov eax, dword [edi + 0x6c]
mov dword [ebp - 0xe0], ecx
dec eax
mov ecx, dword [ebp - 0xd0]
cmp ecx, eax
jge 0x404ead
push dword [ebp + 0x14]
lea eax, [ecx + 1]
push dword [ebp + 0x10]
cdq
push edx
push eax
call fcn.004ef400
jmp 0x404eb9
mov eax, dword [ebp - 0xc8]
mov edx, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0xf0]
sub eax, 1
mov dword [esi + 0x18], eax
sbb edx, 0
sub eax, ecx
mov dword [esi + 0x1c], edx
sbb edx, dword [ebp - 0xe0]
add eax, 1
mov dword [esi + 0x28], eax
mov eax, dword [ebp - 0xe0]
adc edx, 0
mov dword [esi + 0x2c], edx
push 0
push 0
push eax
push ecx
push dword [ebp - 0xe4]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [edi + 0x34]
lea ecx, [edi + 0x30]
cmp eax, dword [ecx + 8]
je 0x404f0a
mov dword [eax], esi
add dword [ecx + 4], 4
jmp 0x404f17
lea edx, [ebp - 0xdc]
push edx
push eax
call fcn.00401710
lea eax, [ebp - 0x104]
mov dword [ebp - 0x104], edi
push eax
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x100], esi
push eax
lea ecx, [ebp - 0x90]
mov byte [ebp - 4], 8
call fcn.00401f90
mov ecx, dword [ebp - 0x10c]
test ecx, ecx
je 0x404fad
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
jne 0x404fad
mov edx, dword [ecx + 0x78]
test edx, edx
je 0x404f64
mov eax, dword [edx]
push ecx
mov ecx, edx
call dword [eax]
jmp 0x404fad
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x404fad
lea eax, [edi + 0x68]
mov dword [ebp - 4], 5
push eax
call fcn.004015b0
add esp, 4
lock inc dword [eax]
mov eax, dword [ebp - 0xd0]
mov esi, dword [ebp + 0x18]
inc eax
jmp 0x404d33
push str._XIMAO___DownloadByParts_pPackageInfo__NULL_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [edi + 0x70], 1
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 0xa
push eax
call fcn.004c7910
add esp, 4
test eax, eax
jne 0x4051af
cmp dword [ebp - 0x44], 0x7fffffff
je 0x4051c0
lea eax, [ebp - 0x70]
mov byte [ebp - 0x18], 1
push eax
call fcn.004c795c
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b4d
mov eax, dword [ebp - 0x8c]
add esp, 8
mov esi, dword [ebp - 0x90]
mov dword [ebp - 0xd4], eax
cmp esi, eax
je 0x405074
cmp dword [esi + 4], 0
je 0x4051da
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [esi + 4], eax
je 0x4051af
push 0
push dword [esi + 4]
push dword [esi]
call fcn.004c7714
add esp, 0xc
test eax, eax
jne 0x4051d3
mov dword [esi], eax
mov dword [esi + 4], eax
add esi, 8
cmp esi, dword [ebp - 0xd4]
jne 0x405035
lea eax, [ebp - 0x40]
push eax
call fcn.004c7b72
add esp, 4
lea ecx, [ebp - 0x84]
call fcn.00402c10
lea ecx, [ebp - 0x90]
call fcn.004032d0
lea eax, [edi + 0x68]
push eax
call fcn.004015a0
mov esi, eax
add esp, 4
mov eax, dword [esi]
nop
test eax, eax
je 0x4050c0
nop dword [eax + eax]
push 0x64
mov ecx, edi
call fcn.00406200
mov eax, dword [esi]
nop
test eax, eax
jne 0x4050b0
mov eax, dword [edi + 0x34]
mov esi, dword [edi + 0x30]
mov dword [ebp - 0xd4], eax
cmp esi, eax
je 0x405104
mov edi, eax
mov eax, dword [esi]
cmp byte [eax], 0
jne 0x4050eb
push str._XIMAO___DownloadByParts_m_packageParts_bSuccess_false_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0xc1], 0
push 0x38
push dword [esi]
call fcn.004ef1f0
add esi, 4
add esp, 8
cmp esi, edi
jne 0x4050d2
mov edi, dword [ebp - 0xec]
mov eax, dword [edi + 0x30]
cmp eax, dword [edi + 0x34]
je 0x40510f
mov dword [edi + 0x34], eax
mov al, byte [ebp - 0xc1]
mov byte [edi + 0x72], al
mov byte [edi + 0x70], 0
test al, al
je 0x405155
push str._XIMAO___DownloadByParts_MoveFileA_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0xd8]
cmp dword [ecx + 0x14], 0xf
jbe 0x405139
mov ecx, dword [ecx]
cmp dword [ebp - 0x94], 0xf
lea eax, [ebp - 0xa8]
push ecx
cmova eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [ebp - 0x94]
cmp ecx, 0xf
jbe 0x40518b
mov edx, dword [ebp - 0xa8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405181
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4051ce
push ecx
push edx
call fcn.004ef1f0
add esp, 8
mov al, byte [ebp - 0xc1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004ef253
mov esp, ebp
pop ebp
ret 0x14
push 5
call fcn.004c8437
call fcn.004ff818
call fcn.00519a40
push 6
mov dword [ebp - 0x44], SysReAllocStringLen
call fcn.004c8437
call fcn.004ff818
push 2
call fcn.004c8437
push 1
call fcn.004c8437
int3