Function at 0x47b620
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd94
push ebx
push esi
mov esi, ecx
push edi
push 0x1f4000
lea ecx, [esp + 0x24]
call fcn.004b9680
xor ebx, ebx
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x44]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x6c], ebx
rep stosd dword es:[edi], eax
mov ecx, 0x24
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
mov ecx, 0x1e3
lea edi, [esp + 0x611]
mov byte [esp + 0x610], al
mov word [esp + 0x308], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xc1
xor eax, eax
lea edi, [esp + 0x30c]
mov edx, 0x56b730
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
mov dword [esp + 0x18], 0xffffffff
cmp edi, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], edx
je 0x47bb43
cmp dword [ebp + 0xc], 1
jl 0x47bb43
mov ecx, dword [0x5a1a04]
lea eax, [esp + 0x610]
add esi, 4
push eax
push esi
mov dword [esp + 0x38], esi
call fcn.0051b610
test eax, eax
jne 0x47b703
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0x56b730
cmp eax, 0xffffffff
je 0x47bb47
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0xffffffff
jmp 0x47bb47
mov ebx, dword [ebp + 0x10]
lea ecx, [esp + 0x100]
push ebx
push esi
push esi
push 0x5965b8
push str._shistorydownloads_s_s_d.hst
push 0x103
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x1c
lea edx, [esp + 0x100]
lea ecx, [esp + 0x14]
push 2
push 0x40000000
push edx
call fcn.00412c80
test al, al
jne 0x47b78e
lea eax, [esp + 0x100]
push eax
push str.HistoryCenter:__s_open_failed
push 1
push 0x596558
call fcn.004aa400
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esp + 0x14], 0x56b730
je 0x47b781
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0
jmp 0x47bb4b
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x3f
lea ecx, [esp + 0x74]
push str._C_opyright_2003__MetaQuotes_Software_Corp.
push ecx
call esi
mov edx, dword [esp + 0x3c]
push 0xb
lea eax, [esp + 0xc0]
push edx
push eax
mov byte [esp + 0xc7], 0
call esi
mov ecx, dword [esp + 0x690]
add esp, 0x18
lea edx, [esp + 0x6c]
mov dword [esp + 0xc0], ecx
push 0x94
push edx
lea ecx, [esp + 0x28]
mov byte [esp + 0xc3], 0
mov dword [esp + 0x74], 0x190
mov dword [esp + 0xc4], ebx
mov dword [esp + 0x34], 0x200
call fcn.004b9750
lea eax, [ebx + ebx*2]
xor ebx, ebx
mov dword [esp + 0x38], ebx
lea eax, [eax + eax*4]
shl eax, 2
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0xc]
test eax, eax
jle 0x47ba48
mov edx, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov esi, dword [ebp + 0x10]
cmp esi, 0xf0
jg 0x47b850
je case.0x47b849.5
add esi, 0xfffffffb
cmp esi, 0x37
ja case.0x47b849.6
xor eax, eax
mov al, byte [esi + 0x47bb68]
jmp dword [eax*4 + 0x47bb60]
cmp esi, 0x5a0
je case.0x47b849.5
cmp esi, 0x2760
je 0x47b8cf
cmp esi, 0xa8c0
jne case.0x47b849.6
test ebx, ebx
je 0x47b87c
cmp dword [edi], ebx
jle case.0x47b849.6
mov ecx, dword [edi]
mov esi, 0x15180
mov eax, ecx
cdq
idiv esi
sub ecx, edx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_gmtime]
add esp, 4
test eax, eax
je 0x47b993
mov eax, dword [eax + 0xc]
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*8]
mov eax, esi
shl edx, 7
sub eax, edx
mov edx, dword [esp + 0x10]
add edx, eax
mov dword [esp + 0x10], edx
lea ebx, [edx + 0x239880]
jmp case.0x47b849.6
test ebx, ebx
je 0x47b8db
cmp dword [edi], ebx
jle case.0x47b849.6
mov ecx, dword [edi]
mov esi, 0x15180
mov eax, ecx
cdq
idiv esi
sub ecx, edx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_gmtime]
add esp, 4
test eax, eax
je 0x47b993
mov ecx, dword [eax + 0x18]
mov edx, dword [esp + 0x10]
mov eax, ecx
shl eax, 4
sub eax, ecx
neg eax
lea eax, [eax + eax*4]
lea eax, [eax + eax*8]
shl eax, 7
add edx, eax
mov dword [esp + 0x10], edx
lea ebx, [edx + 0x7e900]
jmp case.0x47b849.6
mov ecx, dword [edi]
mov eax, ecx
cdq
idiv dword [esp + 0x3c]
sub ecx, edx
mov edx, ecx
cmp edx, ebx
mov dword [esp + 0x10], edx
je case.0x47b849.6
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_gmtime]
add esp, 4
test eax, eax
je 0x47b993
mov eax, dword [eax + 0x18]
lea edx, [eax + eax*2]
lea eax, [eax + edx*4]
shl eax, 4
movsx ecx, word [esp + eax + 0x6c4]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], ecx
cmp eax, 0x1f3c18
jle 0x47b98b
mov edx, dword [esp + 0x24]
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.00412d40
mov dword [esp + 0x28], 0
mov edx, dword [esp + 0x10]
mov ebx, edx
jmp case.0x47b849.6
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x47b9ac
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea edx, [edx + eax*4]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x40]
cmp eax, edx
jge 0x47b9e2
test eax, eax
je 0x47b9cc
lea ecx, [esp + 0x40]
push 0x2c
push ecx
lea ecx, [esp + 0x28]
call fcn.004b9750
mov edx, dword [esp + 0x10]
mov esi, edi
mov ecx, 0xb
lea edi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 8]
mov dword [esp + 0x40], edx
jmp 0x47ba33
fld qword [esp + 0x54]
fcomp qword [edi + 0x14]
fnstsw ax
test ah, 1
je 0x47b9fe
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
fld qword [esp + 0x4c]
fcomp qword [edi + 0xc]
fnstsw ax
test ah, 0x41
jne 0x47ba1a
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
fld qword [esp + 0x64]
fadd qword [edi + 0x24]
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x20]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ecx
fstp qword [esp + 0x64]
mov eax, dword [esp + 0x34]
add edi, 0x2c
dec eax
mov dword [ebp + 8], edi
mov dword [esp + 0x34], eax
jne 0x47b824
mov eax, dword [esp + 0x40]
test eax, eax
je 0x47ba60
lea edx, [esp + 0x40]
push 0x2c
push edx
lea ecx, [esp + 0x28]
call fcn.004b9750
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x47ba77
push eax
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
call fcn.00412d40
mov eax, dword [esp + 0x18]
or ebx, 0xffffffff
cmp eax, ebx
je 0x47ba8d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x308]
mov dword [esp + 0x1c], 0
push ecx
mov ecx, 0x593d48
call fcn.0042f040
mov esi, dword [ebp + 0x10]
mov edi, dword [esp + 0x30]
push esi
lea edx, [esp + 0x328]
push edi
push edx
push 0x5965b8
push str._shistory_s_s_d.hst
lea eax, [esp + 0x218]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x1c
lea ecx, [esp + 0x204]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [esp + 0x204]
lea eax, [esp + 0x100]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [0x596208]
push esi
push edi
call fcn.00475fb0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0x56b730
cmp eax, ebx
je 0x47bb24
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], 0
call fcn.004b96b0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x20]
call fcn.004b96b0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc